fix(toolbar-search): fix types for on:clear (#2022)

This commit is contained in:
Eric Liu 2024-10-25 15:38:31 -07:00 committed by GitHub
commit 58e6021b08
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 16 additions and 13 deletions

View file

@ -4549,8 +4549,8 @@ None.
### Events
| Event name | Type | Detail |
| :--------- | :-------- | :----- |
| clear | forwarded | -- |
| :--------- | :--------- | :---------------- |
| clear | dispatched | <code>null</code> |
| change | forwarded | -- |
| input | forwarded | -- |
| focus | forwarded | -- |

View file

@ -14257,7 +14257,7 @@
"moduleExports": [],
"slots": [],
"events": [
{ "type": "forwarded", "name": "clear", "element": "Search" },
{ "type": "dispatched", "name": "clear", "detail": "null" },
{ "type": "forwarded", "name": "change", "element": "Search" },
{ "type": "forwarded", "name": "input", "element": "Search" },
{ "type": "forwarded", "name": "focus", "element": "Search" },

View file

@ -1,5 +1,8 @@
<script>
/** @restProps {input} */
/**
* @restProps {input}
* @event {null} clear
*/
/**
* Specify the value of the search input

View file

@ -69,7 +69,7 @@ export interface ToolbarSearchProps extends RestProps {
export default class ToolbarSearch extends SvelteComponentTyped<
ToolbarSearchProps,
{
clear: WindowEventMap["clear"];
clear: CustomEvent<null>;
change: WindowEventMap["change"];
input: WindowEventMap["input"];
focus: WindowEventMap["focus"];