-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ListGroup): improve configuration options #106
Conversation
It does not only change the configuration, but also the behaviour when you add new items. Note that without the proposed changes, the newly added items are stacked one on another. This means that if I add two items, the first one of these takes position no. 2. Check out this footage: old-listener.mp4With this PR, only the newly added item (singular) is placed on top while the item added previously is placed as in the "sorted" order. So if add two items, the former one can be placed anywhere within the "old" items. Check out the footage: listener.mp4So if we merge this, it will behave differently than the nested list. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check out the comment above.
So you mean it should only sort in case we close / open again? |
1ed620e
to
dcebd1b
Compare
At least that's how it is implemented in nested list and the current version of list group. |
Yes. Sort only kicks in on close/open or when switching element selection. The requirement behind this is that list items must not jump when adding or editing items. |
* Place items on bottom if sorting is disabled * Make it possible to disable autoOpening via new parameter `autoOpen` related to #96
70f29a1
to
95d4f07
Compare
Thanks @andreasgeier and @barmac for the hint and explanation. With the support of @pinussilvestrus this was fixed: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works as expected. I created a follow-up issue for an a11y issue I noticed: #107. It is not a regression.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ LGTM
autoOpen
related to #96