-
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
Can not replace "integer" widget #4163
Comments
You probably want to override the |
Thanks for your suggestion. I did try to override the "updown" and even "range" and "radio" but the problem persists. here is my simple schema: "{
} I am out of ideas! Any help? |
Here is the funny thing: when I replace text, with my custom integer compoment const widgets = { text AND integer fields change to my component. I am confused. |
This is the only workaround I found to replace "integer" with a custom widget: "use client"; import React from "react"; const MyTest = () => { const CustomIntegerWidget = (props: WidgetProps) => { Custom Widget <input type="number" className="custom-number-widget" value={props.value} required={props.required} onChange={(event) => props.onChange(event.target.value)} /> ); }; const uiSchema = {}; return ;}; export default MyTest; |
Prerequisites
What theme are you using?
antd
Version
5.x
Current Behavior
I can succesfully replace the "uri" widget with a custom one, but whatever i try I cant replace "integer". Why?
...
const widgets = {
uri: MyForm_Uploader,
integer: MyForm_Integer,
};
return (
{schema && (
{/* Empty fragment = No Submit Button */}
<></>
Expected Behavior
To see my custom widget in the form (I can only see the default one)
Steps To Reproduce
No response
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: