Skip to content

Commit

Permalink
fix: fixed value to be return and removed unnecessary value (#18012)
Browse files Browse the repository at this point in the history
* fix: fixed value to be return and removed unnecessary value

* fix: added example value in action
  • Loading branch information
guidari authored Nov 11, 2024
1 parent bceb0a0 commit 46a1cf6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ const TableToolbarSearch = ({
const onChange = (e) => {
setValue(e.target.value);
if (onChangeProp) {
onChangeProp(e);
onChangeProp(e, e.target.value);
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ export const Playground = (args) => {
<TableToolbarContent>
{/* pass in `onInputChange` change here to make filtering work */}
<TableToolbarSearch
onChange={(evt) => {
action('TableToolbarSearch - onChange')(evt);
onChange={(evt, value) => {
action(`TableToolbarSearch - onChange ${value}`)(evt);
onInputChange(evt);
}}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,7 @@ interface TableToolbarFilterProps {
/**
* Provide an optional hook that is called each time the input is updated
*/
onChange?: (
event: '' | ChangeEvent<HTMLInputElement>,
value?: string
) => void;
onChange?: (event: '' | ChangeEvent<HTMLInputElement>) => void;

/**
* Provide an function that is called when the apply button is clicked
Expand Down

0 comments on commit 46a1cf6

Please sign in to comment.