Sort persistent notifications ascending#7195
Conversation
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
|
@bramkragten should I add undefined check as you suggested here: #7199 (comment) |
Depends on the type, can it be undefined? |
|
Instead of the logic added here, and more or less the same logic in #7199, shouldn't we rather make a new helper for |
According to the interface, it can't be undefined. |
|
@bramkragten should I do something else in this PR? so really no ideas on how to make this a generic function. |
|
Something like this? And usage looks like this: |
|
The helper function can be done in a new PR. |
Breaking change
Proposed change
sort persistent notifications, to show the most recent on top.
The sort is done in code, the other option is to use https://polymer-library.polymer-project.org/3.0/api/elements/dom-repeat#DomRepeat-property-sort, but notification-drawer will be rewritten someday to Lit, so the first option was easier.
Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: