-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
I tried copying over the code from the antd Form List, added the necessary dependencies and ran into this issue:
config.tsx:62 Uncaught Error: Widget 'form-list' not defined. Did you define it?
at Object.getWidgetDef (config.tsx:62:15)
at NiceForm.tsx:65:26
at Array.map (<anonymous>)
at NiceForm (NiceForm.tsx:24:25)
at renderWithHooks (react-dom.development.js:16305:18)
at mountIndeterminateComponent (react-dom.development.js:20074:13)
at beginWork (react-dom.development.js:21587:16)
at HTMLUnknownElement.callCallback2 (react-dom.development.js:4164:14)
at Object.invokeGuardedCallbackDev (react-dom.development.js:4213:16)
at invokeGuardedCallback (react-dom.development.js:4277:31)
By copying this over from packages/examples-antd/src/main.tsx into the example code, it does work:
import { config as niceFormConfig } from '@ebay/nice-form-react';
import antdAdapter from '@ebay/nice-form-react/adapters/antdAdapter';
niceFormConfig.addAdapter(antdAdapter);Because antdAdapter defines the form-list widget.
This is most likely the same for the formik form-list, but might happen in even more files.
To make it easier for developers to play around with nice-form-react, it'd be better if the example code is self-contained.
Metadata
Metadata
Assignees
Labels
No labels