Open johnholdun opened 5 years ago
Can see this being super useful for a "toast" or flash feature as well to remove it from the dom.
@snellingio Yeah, really like that idea. There is a Remove action already, would that be confusing?
Or maybe Remove could be extended to accept a delay value. If no delay value is provided it waits for a click (current behavior) but if delay is provided it removes on either a click or after the delay time 🤔
Or maybe Remove could be extended to accept a delay value.
I think another way to handle this is to add this hypothetical "auto" directive to a button that also has a "remove" directive. This button could be displayed to the user as a dismiss option for the alert in case they want to dismiss it more quickly; if they don't, after the specified delay, the button would receive a click
event, which then triggers the remove
and removes the alert from the DOM.
Automatically interact with something after a specified duration, or when it comes into view. Useful for automatic data refreshes and infinite scroll.