You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by icedcola November 14, 2024
Hello. I'm having some trouble defining new field types with the overrides. Just wondering if I am doing something silly, or if the overrides aren't meant for this.
I have an override like so (just to test):
constoverrides={fieldTypes: {slider: ({ name, onChange, value })=>(<div>Slide!</div>),
},
gives an Uncaught TypeError: defaultFields[field.type] is not a function at AutoFieldInternal error.
The Docs mention "You can specify a custom render method for each known field type, or introduce completely new ones."
I replaced with a text or number override and that seems to work. Assuming it is only for overriding default field types, but hopefully I'm just messing something up :) Thank you for any help.
Best regards,
Matt
The text was updated successfully, but these errors were encountered:
Discussed in #702
Originally posted by icedcola November 14, 2024
Hello. I'm having some trouble defining new field types with the overrides. Just wondering if I am doing something silly, or if the overrides aren't meant for this.
I have an override like so (just to test):
and using it in a component:
gives an
Uncaught TypeError: defaultFields[field.type] is not a function at AutoFieldInternal
error.The Docs mention "You can specify a custom render method for each known field type, or introduce completely new ones."
I replaced with a
text
ornumber
override and that seems to work. Assuming it is only for overriding default field types, but hopefully I'm just messing something up :) Thank you for any help.Best regards,
Matt
The text was updated successfully, but these errors were encountered: