Merge pull request #713 from smartxworks/fix/collapse

fix(Collapse): fix a dead loop caused by passing in a new array
This commit is contained in:
tanbowensg 2023-05-19 10:04:58 +08:00 committed by GitHub
commit 4fb5d3bba8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,7 +69,7 @@ export const Collapse = implementRuntimeComponent({
const { elementRef, mergeState, slotsElements, customStyle, callbackMap } = props;
const [activeKey, setActiveKey] = useStateValue(
defaultActiveKey.map(String),
defaultActiveKey,
mergeState,
updateWhenDefaultValueChanges,
'activeKey'