diff --git a/src/components/Pagination/__stories__/Pagination.stories.tsx b/src/components/Pagination/__stories__/Pagination.stories.tsx index 113167dc8f..b891e9826e 100644 --- a/src/components/Pagination/__stories__/Pagination.stories.tsx +++ b/src/components/Pagination/__stories__/Pagination.stories.tsx @@ -6,8 +6,14 @@ import {Pagination, PaginationProps} from '../../Pagination'; const useState = (args: PaginationProps) => { const [state, setState] = React.useState({...args}); + const onUpdate: PaginationProps['onUpdate'] = (page, pageSize) => setState((prevState) => ({...prevState, page, pageSize})); + + React.useEffect(() => { + setState({...args}); + }, [args]); + return {...state, onUpdate}; };