score:2
Accepted answer
Fluent UI onChange function expects two parameters: event and value(optional)
(event: React.FormEvent<HTMLInputElement | HTMLTextAreaElement>, newValue?: string) => void
https://developer.microsoft.com/en-us/fluentui#/controls/web/textfield#implementation
You may change your handleInputChange function like this:
const handleInputChange = (
event: { target: HTMLInputElement },
newValue:String
):void => {
const { name } = event.target;
setUser({ ...user, [name]: newValue });
};
You can check this working fiddle from here
Source: stackoverflow.com
Related Query
- React with Fluent UI Form onChange not working (very simple code)
- Form edit not working in react with onchange
- React - Ant Design, Form with getFieldDecorator and initialValue not working in single chechbox
- Using emmet with a react app in vs code is not working
- React router v4 broswer history not working with code splitting
- React form elements onchange event not working when generated dynamically
- My onChange not working with react
- Form validation not working with React hooks form version 7 with Reactstrap
- matching passwords with react hooks is not working after onchange
- React Hook Form errors not working with Chakra UI
- Simple React example with state not working
- How to use the react spring hook with react. Basic code not working
- testing a react form with pure Jest library (no enzyme) not working
- setValue in react hook form not working with react-datepicker
- Code Splitting not working with CRA + React Route v4 + Code Splitting
- simple Debounce not working in react 16 but works in jsfiddle with react 14.3
- React final form not working with typescript
- React Hook Form validation with Material UI TextField is not working
- Why my javaScript code in not working with my react Component?
- Typescript + react 17 + webpack 5. Code splitting with react HashRouter not working
- Styled Components with React - form onSubmit not working
- React Form with form data held as Object within Form state - reset not working
- React Router with custom history not working
- React Form Component onSubmit Handler Not Working
- React router v4 not working with Redux
- Formik & yup form validation not working as expected with VirtualizedSelect
- React Error Boundaries not working with React
- React JS not working with Internet Explorer 9
- React Native Image Not Working with specific URL
- React hook useRef not working with styled-components and typescript
More Query from same tag
- Importing a bunch of files in react js at a go
- change color depending on value with javascript
- Good way to chain or combine multiple "patchers"?
- How to restrict props.children in react typescript?
- How to pass a state from component to a parent - the App.js (click outside to close navbar)
- ReactJS href attribute of collapse can't take props value
- React - Conditional JSX Render
- how to download an excel file in react from NodeJS
- how do antd forms work with react?
- How to combine my two const in my handle changer in react & filter my array
- Jest: how to test a function defined with "export function"?
- Check if the state value is date in reactjs
- Passing Data Between Route and Nested Route in React
- Linear transformation and matrix multiplication fails with JS
- Extend the React Router of exist application on fly
- Type Error: cannot read property ' map ' of undefined
- React. When import function in component function, can i know why it didn`t work hooks setState..?
- How change gray background by item on another, when he is selected?
- Retrieve recompose local dispatch function from withReducer in withHandlers
- Is it a good practice to use lazy() and Suspense for image loading?
- Destructuring props in React -> need help understanding how it works in my particular case
- React - Use JSON to store data
- How to get image Height and Width while uploading image in React?
- onChange function for input fields not working
- React JS setTimeout gets executed multiple times
- why is react axios call returning empty result?
- Style Chakra UI FormControl and label at application theme level
- Axios works for GET but doesn't work for POST and DELETE?
- Tailwindcss manual dark mode doesn't work in NextJS project
- React TinyMce: 'tinymce' is not defined no-undef