fix(client): fix variable component for preload label based on value (#2200)
This commit is contained in:
		
							parent
							
								
									5a8f3d1ae3
								
							
						
					
					
						commit
						ff9e96d38b
					
				| @ -232,7 +232,7 @@ export function Input(props) { | |||||||
| 
 | 
 | ||||||
|   useEffect(() => { |   useEffect(() => { | ||||||
|     const run = async () => { |     const run = async () => { | ||||||
|       if (!variable || !options.length) { |       if (!variable || options.length <= 1) { | ||||||
|         return; |         return; | ||||||
|       } |       } | ||||||
|       let prevOption: DefaultOptionType = null; |       let prevOption: DefaultOptionType = null; | ||||||
|  | |||||||
| @ -45,9 +45,9 @@ const InternalField: React.FC = (props) => { | |||||||
|     setFieldProps('title', uiSchema.title); |     setFieldProps('title', uiSchema.title); | ||||||
|     setFieldProps('description', uiSchema.description); |     setFieldProps('description', uiSchema.description); | ||||||
|     setFieldProps('initialValue', uiSchema.default); |     setFieldProps('initialValue', uiSchema.default); | ||||||
|     if (!field.validator && uiSchema['x-validator']) { |     // if (!field.validator && uiSchema['x-validator']) {
 | ||||||
|       field.validator = uiSchema['x-validator']; |     //   field.validator = uiSchema['x-validator'];
 | ||||||
|     } |     // }
 | ||||||
|     if (fieldSchema['x-disabled'] === true) { |     if (fieldSchema['x-disabled'] === true) { | ||||||
|       field.disabled = true; |       field.disabled = true; | ||||||
|     } |     } | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user