@empathyco/x-components
Version:
Empathy X Components
24 lines (15 loc) • 1.17 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [ClearSearchInput](./x-components.clearsearchinput.md)
## ClearSearchInput variable
This component renders a button to delete the current query.
**Signature:**
```typescript
_default: import("vue").DefineComponent<{}, {
dynamicClasses: import("vue").ComputedRef<VueCSSClasses>;
clearSearchInputEvents: import("vue").Ref<{
UserPressedClearSearchBoxButton: undefined;
}>;
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>
```
## Remarks
A button that when pressed emits the [SearchBoxXEvents.UserPressedClearSearchBoxButton](./x-components.searchboxxevents.userpressedclearsearchboxbutton.md) and [SearchBoxXEvents.UserClearedQuery](./x-components.searchboxxevents.userclearedquery.md) events, expressing the user intention to clear the current query. It also adds `x-clear-search-input--has-empty-query` as class when there is no query.