-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Generic support for Chakra UI #3327
Conversation
- Partially fix rjsf-team#3072 - Extract ChakraIconButton to its own file to abstract away React.memo - Refactor AltDateWidget to extract DateElement component
@@ -16,6 +19,31 @@ const rangeOptions = (start: number, stop: number) => { | |||
return options; | |||
}; | |||
|
|||
function DateElement< |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This component was originally created within the AltDateWidget component, so I extracted it to prevent potential performance issues where the component may be excessively re-rendered.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should do this for other themes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, update the main index.tsx
(maybe rename to index.ts
since it doesn't need to be a .tsx
)
import Form from "./Form";
export { default as Form, generateForm } from "./Form";
export { default as Templates, generateTemplates } from "./Templates";
export { default as Theme, generateTheme } from "./Theme";
export { default as Widgets, generateWidgets } from "./Widgets";
export { __createChakraFrameProvider } from "./ChakraFrameProvider";
export type { ChakraUiSchema as UiSchema } from "./utils";
export default Form;
* Generic support for Chakra UI - Partially fix rjsf-team#3072 - Extract ChakraIconButton to its own file to abstract away React.memo - Refactor AltDateWidget to extract DateElement component * Changes from code review * Update packages/chakra-ui/src/IconButton/index.ts Co-authored-by: Heath C <51679588+heath-freenome@users.noreply.github.com>
* Generic support for Chakra UI - Partially fix rjsf-team#3072 - Extract ChakraIconButton to its own file to abstract away React.memo - Refactor AltDateWidget to extract DateElement component * Changes from code review * Update packages/chakra-ui/src/IconButton/index.ts Co-authored-by: Heath C <51679588+heath-freenome@users.noreply.github.com>
Checklist
npm run test:update
to update snapshots, if needed.