-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Add support for state content customization in tile card #18180
Conversation
private async _createSortable() { | ||
const Sortable = await loadSortable(); | ||
this._sortable = new Sortable( | ||
this.shadowRoot!.querySelector("ha-chip-set")!, |
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.
We should probably also add sort support to the checkbox option then?
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.
I think we should force the dropdown layout if reorder selector option is true. We already do that if there is a custom value. Reordering checkbox is weird.
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.
works for me
4e9955c
to
b920cda
Compare
@bramkragten I also added a |
e8f6eba
to
50fe8fd
Compare
this.selector.select?.reorder | ||
) { | ||
this._createSortable(); | ||
} else if (!this.value?.length && this._sortable) { |
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.
} else if (!this.value?.length && this._sortable) { | |
} else if (this._sortable && (!this.selector.select?.reorder || !this.value?.length)) { |
039bb3b
to
1dcb95e
Compare
Card
The state can be replaced by one or multiple attribute to avoid the usage of templating.
state
andlast-changed
key are allowed too. An option as been added to totally state the state.Config
Two new options has been added.
Editor
The editor uses a multiple select to let the user choose attributes. Items are draggable for re-ordering.
Demo
CleanShot.2023-10-16.at.14.45.23.mp4
Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: