Skip to content
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

Modifier cleanup needs improvement #149

Open
lukemelia opened this issue Nov 5, 2023 · 3 comments
Open

Modifier cleanup needs improvement #149

lukemelia opened this issue Nov 5, 2023 · 3 comments

Comments

@lukemelia
Copy link

Currently, the modifier calls floating-ui's autoUpdate in its modify method, which will run whenever an input changes. The method captures the cleanup function that autoUpdate returns and registers it as a destructor, but that can still result in multiple autoUpdates being registered.

Instead, the modifier should capture the last cleanup method and call it at the beginning of the modify method, if present. (There will be none captured the first time the modifier instance runs.)

@NullVoxPopuli
Copy link
Contributor

Ye, i'd like to see a function-modifier implementation

@NullVoxPopuli
Copy link
Contributor

fwiw, I'm continuing development over in https://ember-primitives.pages.dev/

@NullVoxPopuli
Copy link
Contributor

Resolved in universal-ember/ember-primitives#380

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants