-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add a withMountOnInteraction
decorator
#192
Comments
@titouanmathis Maybe can we just use a config param who is enabled by default ? |
Do you have an API in mind for surch a configuration? |
import { Base } from '@studiometa/js-toolkit';
export class UnmountedBase extends Base {
static config = {
name: 'UnmountedBase',
inert: true,
}
} |
I actually prefer decorators for such specific needs which might not benefit most use cases for 2 reasons:
I think it would be more easily implemented in a decorator as well as we could simply override the |
Thank you @titouanmathis, so what's the final spec for this decorator ? Would you like something like this: $mount(force) {
if(!force) {
return;
}
super.$mount();
} Or maybe like this: mountIsEnabled = false;
$mount() {
if(!mountIsEnabled) {
this.mountIsEnabled = true;
return;
}
super.$mount();
} Have you an example of a programmed mounting ? |
I'm going to add the decorator |
Or maybe a
withKeepUnmounted()
decorator to be able to use components and mount them programatically when needed.The text was updated successfully, but these errors were encountered: