Przeglądaj źródła

fix(materials): mouseup event propagation in condition (#458)

* fix(materials): mouseup event propagation in condition

* fix(docs): form-materials
Yiwei Mao 6 miesięcy temu
rodzic
commit
4a857ba9a3

+ 1 - 1
apps/docs/components/materials.tsx

@@ -12,7 +12,7 @@ export function MaterialDisplay(props: any) {
       <br />
       <PackageManagerTabs
         command={{
-          'By Import': `import { ${props.exportName} } from '@flowgram.ai/materials'`,
+          'By Import': `import { ${props.exportName} } from '@flowgram.ai/form-materials'`,
           // components/type-selector/index.tsx -> components/type-selector
           'By CLI': `npx @flowgram.ai/form-materials@latest ${props.filePath
             .split('/')

+ 6 - 1
packages/materials/form-antd-materials/src/components/condition-row/index.tsx

@@ -67,7 +67,12 @@ export function ConditionRow({ style, value, onChange, readonly }: PropTypes) {
               onChange={(v) => onChange({ ...value, right: v })}
             />
           ) : (
-            <UIInput size="small" disabled value={opConfig?.rightDisplay || 'Empty'} />
+            <UIInput
+              size="small"
+              disabled
+              style={{ pointerEvents: 'none' }}
+              value={opConfig?.rightDisplay || 'Empty'}
+            />
           )}
         </UIRight>
       </UIValues>

+ 6 - 1
packages/materials/form-materials/src/components/condition-row/index.tsx

@@ -65,7 +65,12 @@ export function ConditionRow({ style, value, onChange, readonly }: PropTypes) {
               onChange={(v) => onChange({ ...value, right: v })}
             />
           ) : (
-            <Input size="small" disabled value={opConfig?.rightDisplay || 'Empty'} />
+            <Input
+              size="small"
+              disabled
+              style={{ pointerEvents: 'none' }}
+              value={opConfig?.rightDisplay || 'Empty'}
+            />
           )}
         </UIRight>
       </UIValues>