mirror of
https://github.com/flarum/framework.git
synced 2024-11-25 09:41:49 +08:00
d1c436c4d5
Since Mithril doesn't really offer granular redraw control, typing in a text input on a modal would trigger a redraw for the whole page (including the page content behind the modal) on every keystroke. This commit allows components to be "paused" so that their vdom subtree will be retained instead of reconstructed on subsequent redraws. When a modal is opened, we pause the main page component, and when it's closed, we unpause it. This means that while a modal is visible, only the content inside of the modal will be redrawn, dramatically improving performance. |
||
---|---|---|
.. | ||
components | ||
helpers | ||
initializers | ||
models | ||
utils | ||
App.js | ||
Component.js | ||
extend.js | ||
Model.js | ||
Session.js | ||
Store.js | ||
Translator.js |