State object is not updating, instead it is showing the default in the database
i’m new to react and I’m trying to update the CategoryId in the state object. In the handleCategoriesChange method, I have attempted to update the state with the option selected from the dropdown with the index. In the database, it is just saving the default value which is 1 but not the option that is chosen. I would appreciate any help thanks.
State object is not updating, instead it is showing the default in the database
i’m new to react and I’m trying to update the CategoryId in the state object. In the handleCategoriesChange method, I have attempted to update the state with the option selected from the dropdown with the index. In the database, it is just saving the default value which is 1 but not the option that is chosen. I would appreciate any help thanks.