From fcd627ab6ac6fd5eb03d73363048fee589fb2f2f Mon Sep 17 00:00:00 2001 From: pengYYY Date: Mon, 19 Sep 2022 19:11:42 +0800 Subject: [PATCH] fix: cascader dynamic empty options --- src/cascader/hooks.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cascader/hooks.tsx b/src/cascader/hooks.tsx index 182884710..873e93fda 100644 --- a/src/cascader/hooks.tsx +++ b/src/cascader/hooks.tsx @@ -82,8 +82,8 @@ export const useCascaderContext = (props: TdCascaderProps) => { const { disabled, options = [], keys = {}, checkStrictly = false, lazy = true, load, valueMode = 'onlyLeaf' } = props; useEffect(() => { - if (!options.length) return; if (!treeStore) { + if (!options.length) return; const store = new TreeStore({ keys: { ...keys,