-
Notifications
You must be signed in to change notification settings - Fork 74
Description
Currently, the only way to get flex values are to listen to the onResizeStop
but that only gives access to the data of the two ReflexElement
being resized. I checked the docs, the relevant piece seems to be: https://gist.github.com/leefsmp/28ceb226d119d179d1e94466d2dd1a8b#file-re-flex-demo-storage-jsx
However, this misses a few cases:
-
What do we do if we have more than 2 items? The resize event will only fire for two items but ignore the third (as it should). We're left to guess the flex of the 3rd, 4th,... item.
-
Tied to 1 but data can only be retrieved when a resize happens. While you can provide initial flexes, let's assume from local storage, you'd need to have performed an
onResizeStop
event on all theReflexElement
components for you to be able to store ALL the values.
This can be mitigated by providing initial flexes on all the elements and then updating these that need updating on the onResizeStop
event, but was wondering if this information was exposed somewhere.