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

"Remove After" feature enhancement #20

Closed
weavermedia opened this issue Oct 14, 2019 · 1 comment
Closed

"Remove After" feature enhancement #20

weavermedia opened this issue Oct 14, 2019 · 1 comment

Comments

@weavermedia
Copy link

weavermedia commented Oct 14, 2019

Maybe the Remove feature could be extended to accept a delay value:

<button data-trimmings-remove=".modal" data-trimmings-remove-after="5">
  Close modal
</button>

If no delay value is provided it waits for a click (current behavior). If a delay value is provided it removes the element after the delay time, whether a click was detected or not. Great for automatically dismissing notifications.

Similar to what @snellingio mentioned in #1

@johnholdun
Copy link
Contributor

Hi! You would definitely be able to do this with the auto feature proposed in #1. The general auto directive would send particular events based on the type of element it's bound to—click for <a> and <button>; submit for <form>. If that bound button also has a remove directive, it would be triggered by the sending of the click event. So there's no need for a remove-specific version of this feature.

Closing this ticket in favor of continuing to discuss the API for #1, but if I've missed something here please let me know. Thank you!

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