Skip to content

Commit 794a482

Browse files
committed
fix: [Search] fix type
1 parent 4f05230 commit 794a482

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

demo/src/demo/OrdderSelector.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default () => {
2525
onSearch={(q) => {
2626
console.log(q);
2727
}}
28-
onCancel={() => {
28+
onClear={() => {
2929
console.log('cancel');
3030
}}
3131
/>

src/components/Search/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export interface SearchProps extends Omit<InputProps, 'value'> {
1313
disabled?: boolean;
1414
clearable?: boolean;
1515
showSearch?: boolean;
16-
onSearch: (
16+
onSearch?: (
1717
query: string,
1818
event: React.KeyboardEvent<HTMLInputElement> | React.MouseEvent<HTMLButtonElement, MouseEvent>,
1919
) => void;

0 commit comments

Comments
 (0)