Enhance checkbox-list custom field functionality
- Added CheckboxListEnumInput component for handling enumeration inputs. - Updated CheckboxListDefaultInput to support new options structure. - Integrated validation for checkbox list options using Yup. - Modified package.json and package-lock.json to include new dependencies. - Improved admin interface with enhanced input handling and validation feedback.
This commit is contained in:
@@ -26,14 +26,14 @@ const getEnumValues = (attribute: CheckboxListInputProps['attribute']): string[]
|
||||
return [];
|
||||
}
|
||||
|
||||
if (Array.isArray(attribute.enum)) {
|
||||
return attribute.enum;
|
||||
}
|
||||
|
||||
if (Array.isArray(attribute.options?.enum)) {
|
||||
return attribute.options.enum;
|
||||
}
|
||||
|
||||
if (Array.isArray(attribute.enum)) {
|
||||
return attribute.enum;
|
||||
}
|
||||
|
||||
return [];
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user