Hi, thank you for creating this project! I got an error when using this with react-querybuild 8.3.1:
TypeError: Cannot destructure property 'classNames' of 't0' as it is undefined.
at useValueEditor (http://localhost:4000/node_modules/.vite/deps/react-querybuilder.js?v=159b6c2f:5715:23)
at ShadcnUiValueEditor (http://localhost:4000/src/components/querybuilder/value-editor.tsx:53:47)
at react-stack-bottom-frame (http://localhost:4000/node_modules/.vite/deps/react-dom_client.js?v=159b6c2f:16192:20)
at renderWithHooks (http://localhost:4000/node_modules/.vite/deps/react-dom_client.js?v=159b6c2f:4306:24)
at updateFunctionComponent (http://localhost:4000/node_modules/.vite/deps/react-dom_client.js?v=159b6c2f:5972:21)
at beginWork (http://localhost:4000/node_modules/.vite/deps/react-dom_client.js?v=159b6c2f:7048:20)
at runWithFiberInDEV (http://localhost:4000/node_modules/.vite/deps/react-dom_client.js?v=159b6c2f:726:18)
at performUnitOfWork (http://localhost:4000/node_modules/.vite/deps/react-dom_client.js?v=159b6c2f:10831:98)
at workLoopSync (http://localhost:4000/node_modules/.vite/deps/react-dom_client.js?v=159b6c2f:10692:43)
at renderRootSync (http://localhost:4000/node_modules/.vite/deps/react-dom_client.js?v=159b6c2f:10675:13)
The error comes from:
|
const { valueAsArray, multiValueHandler } = useValueEditor({ |
|
handleOnChange, |
|
inputType, |
|
operator, |
|
value, |
|
type, |
|
listsAsArrays, |
|
parseNumbers, |
|
values, |
|
}); |
The fix is simple:
const { valueAsArray, multiValueHandler } = useValueEditor({
handleOnChange,
inputType,
operator,
value,
type,
listsAsArrays,
parseNumbers,
values,
+ schema: allProps.schema
});
Hi, thank you for creating this project! I got an error when using this with react-querybuild 8.3.1:
The error comes from:
react-querybuilder-shadcn-ui/src/components/react-querybuilder-shadcn-ui/ShadcnUiValueEditor.tsx
Lines 43 to 52 in e141446
The fix is simple:
const { valueAsArray, multiValueHandler } = useValueEditor({ handleOnChange, inputType, operator, value, type, listsAsArrays, parseNumbers, values, + schema: allProps.schema });