aboutsummaryrefslogtreecommitdiff
path: root/admin/src/components/CheckboxListInput.tsx
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2026-02-05 16:45:40 +0300
committerValentin Popov <valentin@popov.link>2026-02-05 16:45:40 +0300
commit59be13de07143e546284c75d00ea98c9159aa573 (patch)
tree10d1033894649df3eb6d4fb2c5b66ff42fa42caf /admin/src/components/CheckboxListInput.tsx
parentb9bd07c53d8c624f14f9b7da71ff1e4de099a029 (diff)
downloadstrapi-plugin-checkbox-list-59be13de07143e546284c75d00ea98c9159aa573.tar.xz
strapi-plugin-checkbox-list-59be13de07143e546284c75d00ea98c9159aa573.zip
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.
Diffstat (limited to 'admin/src/components/CheckboxListInput.tsx')
-rw-r--r--admin/src/components/CheckboxListInput.tsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/admin/src/components/CheckboxListInput.tsx b/admin/src/components/CheckboxListInput.tsx
index 51a0d22..07d2776 100644
--- a/admin/src/components/CheckboxListInput.tsx
+++ b/admin/src/components/CheckboxListInput.tsx
@@ -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 [];
};