Closed icrustandi closed 3 years ago
@icrustandi thank you for the PR.
Maybe the most sustainable approach is to make FAutocompleteProps
interface extend AutocompleteProps
from Material UI:
https://github.com/mui-org/material-ui/blob/next/packages/material-ui-lab/src/Autocomplete/Autocomplete.d.ts
Tell me what you think.
@icrustandi thank you for the PR.
Maybe the most sustainable approach is to make
FAutocompleteProps
interface extendAutocompleteProps
from Material UI: https://github.com/mui-org/material-ui/blob/next/packages/material-ui-lab/src/Autocomplete/Autocomplete.d.tsTell me what you think.
Yes! I totally agree - extending the material-ui prop type makes the most sense.
This was actually my mistake - I was using one of your old releases (0.4.1) and conflated that with your most current release. The props that I'm passing in above actually work just fine with your current release without any changes. I'm surprised there weren't any TS errors when I tried it out, but I still think it's a good idea to extend the props from material ui.
@gerhat Is this something that can move forward?
I'm looking to add input masks via rifm or react-input-mask. Both require a custom onChange. Seems this would help.
@michaelpward sorry for being late on merging this. Thank you very much for your input.
To resolve https://github.com/gerhat/material-ui-formik-components/issues/34
For my use case - I needed to be able to trigger a state change depending on the contents of the text field input of the autocomplete component.
This way we can just pass in the onchange to the textFieldProps within the Formik Field component: