esl
esl copied to clipboard
[🚀esl-panel-group]: add ability to specify the strategy of closing panels in case the `max-open-items` limit is reached
As an ESL consumer, I want to have a predictable and full strategy for esl-panel-group in case it handles max-open-items
(more than 1 panel).
Test case:
- Configure 4
esl-panels
inside ofesl-panel-group
- Set
esl-panel-group
limitmax-open-items = "3"
- Make open 2-d, 3-rd and 4-th panel
- Try to open 1-panel, repeat reopening of invective panel
Current behavior: Only 1-st and 2-nd panels can be closed.
Expected behavior: Strategy to close active panels according to some order, ideally predictable.
Considered solutions:
- Implement a round counter to choose an active panel to close
- needs to be implemented in POC, not sure it doable with one simple counter
- Math random
- the easiest way, 100% doable, but unpredictable
- Some other suggestions....
Priority (Minor, Post 4.0.0)