Skip to content

Commit

Permalink
chore(basic dropdown content): add eager declarations for ember-modif…
Browse files Browse the repository at this point in the history
…er 3.2.x compat
  • Loading branch information
gilest committed Oct 22, 2023
1 parent e2c323b commit 0f89589
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions addon/components/basic-dropdown-content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,16 @@ export default class BasicDropdownContent extends Component<Args> {
);
}
}
});
// @ts-ignore
}, { eager: false });

initiallyReposition = modifier(() => {
// Escape autotracking frame and avoid backtracking re-render
Promise.resolve().then(() => {
this.args.dropdown.actions.reposition()
});
});
// @ts-ignore
}, { eager: false });

animateInAndOut = modifier((dropdownElement: Element): () => void => {
if (!this.animationEnabled) return () => {};
Expand All @@ -190,7 +192,8 @@ export default class BasicDropdownContent extends Component<Args> {
(parentElement as HTMLElement).removeChild(clone);
});
};
});
// @ts-ignore
}, { eager: false });

observeMutations = modifier((dropdownElement: Element): () => void => {
this.mutationObserver = new MutationObserver((mutations) => {
Expand Down Expand Up @@ -221,7 +224,8 @@ export default class BasicDropdownContent extends Component<Args> {
this.mutationObserver = undefined;
}
}
});
// @ts-ignore
}, { eager: false });

@action
touchStartHandler(): void {
Expand Down

0 comments on commit 0f89589

Please sign in to comment.