mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-23 18:26:15 +00:00
3d61a36abf
This patch introduces some options that can be passed to setItems and openPopup to prevent doing unecessary work. The main ideas here are to create all the popup items and put them in a document fragment which then will be appended to the popup, so we don't add them one by one which can be costly. When creatingthe items, we also create one directly with the selected class if autoSelect is set to true. This way, we don't have to toggle the class later (which led to another reflow). We take this work as an opportinuity to clean up the component. Unused function (like appendItem and removeItem) are removed, selectedIndex does not use a getter/setter anymore. Some of the consumers calls are updated and so is the component test. Differential Revision: https://phabricator.services.mozilla.com/D4848 --HG-- extra : moz-landing-system : lando |
||
---|---|---|
.. | ||
client | ||
docs | ||
platform | ||
server | ||
shared | ||
startup | ||
.eslintrc.js | ||
.eslintrc.mochitests.js | ||
.eslintrc.xpcshell.js | ||
CODE_OF_CONDUCT.md | ||
moz.build | ||
templates.mozbuild |