From 2b04b18e1f1634a358e245b79aa8da65d33a9e95 Mon Sep 17 00:00:00 2001 From: Joshuan Date: Wed, 24 Jul 2024 15:17:17 +0200 Subject: [PATCH] fix(useList): fix useList hook for support initialization state (#1719) --- src/components/useList/hooks/useList.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/useList/hooks/useList.ts b/src/components/useList/hooks/useList.ts index 69000f2a74..2446bf5b06 100644 --- a/src/components/useList/hooks/useList.ts +++ b/src/components/useList/hooks/useList.ts @@ -32,9 +32,9 @@ export const useList = ({ 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,