فهرست منبع

fix: condition row right clear (#963)

Yiwei Mao 2 ماه پیش
والد
کامیت
0a2c727bc0
1فایلهای تغییر یافته به همراه4 افزوده شده و 0 حذف شده
  1. 4 0
      packages/materials/form-materials/src/components/condition-context/hooks/use-condition.tsx

+ 4 - 0
packages/materials/form-materials/src/components/condition-context/hooks/use-condition.tsx

@@ -125,6 +125,10 @@ export function useCondition({
 
   // When type of target schema updated, clear it
   useEffect(() => {
+    if (!prevTargetSchemaRef.current) {
+      prevTargetSchemaRef.current = targetSchema;
+      return;
+    }
     if (prevTargetSchemaRef.current?.type !== targetSchema?.type) {
       onClearRight?.();
     }