Skip to content

Commit

Permalink
fix: make uiSpec optional
Browse files Browse the repository at this point in the history
  • Loading branch information
lawvs committed Jul 25, 2024
1 parent d7460ba commit 9784b62
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/filter/src/filter-builder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ export const FilterBuilder = <Data,>({
}: {
rule: LooseFilterGroup;
onRuleChange?: (rule: LooseFilterGroup) => void;
uiSpec: UiSpec;
uiSpec: {
dataInputViews?: UiSpec["dataInputViews"];
views?: Partial<UiSpec["views"]>;
primitives?: Partial<UiSpec["primitives"]>;
};
} & BasicFilterProps<Data>) => {
const FilterGroup = useView("FilterGroup");

Expand All @@ -28,7 +32,7 @@ export const FilterBuilder = <Data,>({
],
views: { ...presetUiSpec.views, ...uiSpec.views },
primitives: { ...presetUiSpec.primitives, ...uiSpec.primitives },
};
} satisfies UiSpec;

return (
<FilterUiProvider spec={normalizedSchema}>
Expand Down

0 comments on commit 9784b62

Please sign in to comment.