-
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
Change move item todo API #18410
Change move item todo API #18410
Conversation
); | ||
this._items!.splice(prevIndex + 1, 0, item); | ||
} | ||
this._items = [...this._items!]; |
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.
Is this just making another copy? Seems good just unclear to me as a novice why this is needed.
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 is to force lit to update, otherwise it thinks _items
is not changed.
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.
You can also do this right?
this.requestUpdate("_items");
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.
You can also do this right?
this.requestUpdate("_items");
Not sure if that works with repeat
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.
Nope, it doesn't
Proposed change
For home-assistant/core#102795
Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: