Skip to content

Commit

Permalink
fix(useList): fix useList hook for support initialization state (#1719)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuan authored Jul 24, 2024
1 parent bfdc58a commit 2b04b18
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/useList/hooks/useList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ export const useList = <T>({

const initValues = React.useMemo(() => {
return {
expandedById: {...initialValues?.expandedById, ...initialState.expandedById},
selectedById: {...initialValues?.selectedById, ...initialState.selectedById},
disabledById: {...initialValues?.disabledById, ...initialState.disabledById},
expandedById: {...initialState.expandedById, ...initialValues?.expandedById},
selectedById: {...initialState.selectedById, ...initialValues?.selectedById},
disabledById: {...initialState.disabledById, ...initialValues?.disabledById},
};
}, [
initialState.disabledById,
Expand Down

0 comments on commit 2b04b18

Please sign in to comment.