Skip to content

Commit e5298ed

Browse files
committed
fix(SearchInput): typings
1 parent f114fc5 commit e5298ed

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.changeset/nasty-drinks-roll.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@cube-dev/ui-kit': patch
3+
---
4+
5+
Fix typings for SearchInput to support onSubmit and onClear callbacks.

src/components/forms/SearchInput/SearchInput.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { forwardRef, useRef } from 'react';
2-
import { useSearchFieldState } from 'react-stately';
2+
import { SearchFieldProps, useSearchFieldState } from 'react-stately';
33
import { useSearchField } from 'react-aria';
44

55
import {
@@ -16,7 +16,9 @@ import {
1616
import { tasty } from '../../../tasty';
1717
import { CloseIcon, SearchIcon } from '../../../icons';
1818

19-
export interface CubeSearchInputProps extends CubeTextInputBaseProps {
19+
export interface CubeSearchInputProps
20+
extends CubeTextInputBaseProps,
21+
SearchFieldProps {
2022
/** Whether the search input is clearable using ESC keyboard button or clear button inside the input */
2123
isClearable?: boolean;
2224
}

0 commit comments

Comments
 (0)