Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions components/list/demo/demo-list-nested.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ class ListDemoNested extends LitElement {
`;
}

updated(changedProperties) {
super.updated(changedProperties);
willUpdate(changedProperties) {
super.willUpdate(changedProperties);
if (changedProperties.has('demoItemKey')) {
this._items = listDemos[this.demoItemKey] ?? [];
this._loadedItems = this._items;
Expand Down
4 changes: 2 additions & 2 deletions components/list/demo/list-item-custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ class DemoListItemCustom extends ListItemMixin(LitElement) {
return this._renderListItem(itemTemplates);
}

updated(changedProperties) {
super.updated(changedProperties);
willUpdate(changedProperties) {
super.willUpdate(changedProperties);
if (changedProperties.has('key')) {
this.label = `Label for ${this.key}`;
}
Expand Down
3 changes: 2 additions & 1 deletion components/list/list-item-expand-collapse-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ export const ListItemExpandCollapseMixin = superclass => class extends SkeletonM
}
}

updated(changedProperties) {
willUpdate(changedProperties) {
super.willUpdate(changedProperties);
if (changedProperties.has('_siblingHasNestedItems') || changedProperties.has('expandable')) {
this._renderExpandCollapseSlot = this.expandable || this._siblingHasNestedItems;
}
Expand Down
5 changes: 2 additions & 3 deletions components/list/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,8 @@ class List extends PageableMixin(SelectionMixin(LitElement)) {
${this._renderPagerContainer()}
`;
}

updated(changedProperties) {
super.updated(changedProperties);
willUpdate(changedProperties) {
super.willUpdate(changedProperties);
if (changedProperties.has('breakpoints') && changedProperties.get('breakpoints') !== undefined) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does depend on sizing, but the resize observer handles changes in size. This means that this check only exists for the case where breakpoints change but no resizing takes place, in which case using willUpdate is appropriate.

this.resizedCallback(this.offsetWidth, true);
}
Expand Down
4 changes: 2 additions & 2 deletions components/paging/pageable-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ export const PageableMixin = superclass => class extends CollectionMixin(supercl
});
}

firstUpdated(changedProperties) {
super.firstUpdated(changedProperties);
connectedCallback() {
super.connectedCallback();
this._updateItemShowingCount();
}

Expand Down
Loading