From 7da3ad422f40adc0e180ad6c6b216fd80863c479 Mon Sep 17 00:00:00 2001 From: George Catalin <44193533+rsgcata@users.noreply.github.com> Date: Thu, 22 Jul 2021 23:15:18 +0300 Subject: [PATCH] docs: add missing @search event #1417 --- docs/api/events.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/api/events.md b/docs/api/events.md index 4866fef..710ef2e 100644 --- a/docs/api/events.md +++ b/docs/api/events.md @@ -69,3 +69,21 @@ event is triggered. ```js this.$emit("search:focus"); ``` + +## `search` + +Triggered when the search text changes. + +```js +/** + * Anytime the search string changes, emit the + * 'search' event. The event is passed with two + * parameters: the search string, and a function + * that accepts a boolean parameter to toggle the + * loading state. + * + * @emits search + */ +this.$emit('search', newSearchString, toggleLoading); +``` +