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(() => {
|
||||
const run = async () => {
|
||||
if (!variable || !options.length) {
|
||||
if (!variable || options.length <= 1) {
|
||||
return;
|
||||
}
|
||||
let prevOption: DefaultOptionType = null;
|
||||
|
@ -45,9 +45,9 @@ const InternalField: React.FC = (props) => {
|
||||
setFieldProps('title', uiSchema.title);
|
||||
setFieldProps('description', uiSchema.description);
|
||||
setFieldProps('initialValue', uiSchema.default);
|
||||
if (!field.validator && uiSchema['x-validator']) {
|
||||
field.validator = uiSchema['x-validator'];
|
||||
}
|
||||
// if (!field.validator && uiSchema['x-validator']) {
|
||||
// field.validator = uiSchema['x-validator'];
|
||||
// }
|
||||
if (fieldSchema['x-disabled'] === true) {
|
||||
field.disabled = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user