Skip to content
This repository has been archived by the owner on Jun 29, 2023. It is now read-only.

Commit

Permalink
fix(action, flow, pick-list, sortable-list, tip-manager, value-list):…
Browse files Browse the repository at this point in the history
… react to DOM mutations earlier to avoid stagnant renders (#920)

#919
  • Loading branch information
jcfranco authored Apr 7, 2020
1 parent 34f9a6b commit 700d9f8
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/components/calcite-action/calcite-action.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export class CalciteAction {
//
// --------------------------------------------------------------------------

componentDidLoad(): void {
connectedCallback(): void {
this.observer.observe(this.el, { childList: true, subtree: true });
}

Expand Down
7 changes: 2 additions & 5 deletions src/components/calcite-flow/calcite-flow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,9 @@ export class CalciteFlow {
//
// --------------------------------------------------------------------------

componentWillLoad(): void {
this.updateFlowProps();
}

componentDidLoad(): void {
connectedCallback(): void {
this.flowItemObserver.observe(this.el, { childList: true, subtree: true });
this.updateFlowProps();
}

componentDidUnload(): void {
Expand Down
3 changes: 0 additions & 3 deletions src/components/calcite-pick-list/calcite-pick-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,6 @@ export class CalcitePickList<

connectedCallback(): void {
initialize.call(this);
}

componentDidLoad(): void {
initializeObserver.call(this);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export class CalciteSortableList {
//
// --------------------------------------------------------------------------

componentDidLoad(): void {
connectedCallback(): void {
this.items = Array.from(this.el.children);
this.setUpDragAndDrop();
this.beginObserving();
Expand Down
3 changes: 0 additions & 3 deletions src/components/calcite-tip-manager/calcite-tip-manager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,6 @@ export class CalciteTipManager {

connectedCallback(): void {
this.setUpTips();
}

componentDidLoad(): void {
this.observer.observe(this.el, { childList: true, subtree: true });
}

Expand Down
3 changes: 0 additions & 3 deletions src/components/calcite-value-list/calcite-value-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,6 @@ export class CalciteValueList<
// --------------------------------------------------------------------------
connectedCallback(): void {
initialize.call(this);
}

componentDidLoad(): void {
this.setUpDragAndDrop();
initializeObserver.call(this);
}
Expand Down

0 comments on commit 700d9f8

Please sign in to comment.