Skip to content

Commit

Permalink
fix(admin): wip allow empty list view configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoward1994 committed Mar 6, 2024
1 parent 555e456 commit a1181fa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/core/admin/admin/src/components/Form.tsx
Expand Up @@ -547,7 +547,7 @@ const reducer = <TFormValues extends FormValues = FormValues>(
draft.values = setIn(
state.values,
action.payload.field,
newValue.length > 0 ? newValue : undefined
Array.isArray(newValue) ? newValue : undefined
);

break;
Expand Down
Expand Up @@ -82,7 +82,7 @@ const Settings = () => {

React.useEffect(() => {
if (sortOptionsSorted.findIndex((opt) => opt.value === currentSortBy) === -1) {
onChange('settings.defaultSortBy', sortOptionsSorted[0].value);
onChange('settings.defaultSortBy', sortOptionsSorted[0]?.value);
}
}, [currentSortBy, onChange, sortOptionsSorted]);

Expand Down

0 comments on commit a1181fa

Please sign in to comment.