From 14572d6df13db3c5d503474ed5e143640eab17bc Mon Sep 17 00:00:00 2001 From: carson Date: Fri, 1 Jan 2021 20:51:22 -0700 Subject: [PATCH] docs for the `from` trigger modifier --- www/attributes/hx-trigger.md | 1 + 1 file changed, 1 insertion(+) diff --git a/www/attributes/hx-trigger.md b/www/attributes/hx-trigger.md index 00012956..248907e1 100644 --- a/www/attributes/hx-trigger.md +++ b/www/attributes/hx-trigger.md @@ -57,6 +57,7 @@ Standard events can also have modifiers that change how they behave. The modifi is seen again it will reset the delay. * `throttle:` - a throttle will occur before an event triggers a request. If the event is seen again before the delay completes it is ignored, the element will trigger at the end of the delay. +* `from:` - allows the event that triggers a request to come from another element in the document (e.g. listening to a key event on the body, to support hot keys) Here is an example of a search box that searches on `keyup`, but only if the search value has changed and the user hasn't typed anything new for 1 second: