score:2
so using suggestion provided by @praveen kumar.
i removed the extra handlers and just changed the below line to pass the value
from selected option as an argument.
<select onchange={(e) => onupdateshelf(book, e.target.value)}>
Source: stackoverflow.com
Related Query
- Passing value from select box as argument in React
- get value from select -- REACT
- How to use react ref to get value from html select element?
- Setting a default value on a react select dropdown that is populated from an API call
- Populate react select options array with key value pairs from firebase collection
- load options of a select box dynamically based on value of another select box in react
- Remove blue outline from Select box React Material UI
- How to map an array of strings from react state to a select box
- React - how to populate one select menu based on a value of another select menu using data from a local .json file
- React - Passing state from child to parent in drop down select
- How to reset value of select box to default in react
- Passing value from p5 sketch to React (with react-p5-wrapper)
- Select a value from input combo box using Selenium using xpath for a reachjs control
- React - Passing a value from child component to the parent component
- React Component as Const select onChange passing selected value
- select option from dropdown using API and get that selected value but i am getting last value which i have not selected in react
- How to use the useHook in the component rather than passing the value returned from it as a prop to the components using react and typescript?
- Can't read value from select tag in react JSX
- How to set default value in material-UI select box in react (after API call)?
- react onselect passing value in addition to the Select option values
- How to get value from React Select Form
- How to Get Selected Value from a Select Input in react
- show input field when other option is selected from select box using ionic react
- Passing some value from one page to other page in react
- react js update value from multiple radio and text box
- How to render multiple dynamic options into select box in React from Axios
- Passing variable value from react constructor to nodeJS backend
- Value of Select Tag from state dom is not changing in react
- Using Variable from Props vs Passing Prop as Argument in React
- How to select a specific value from the initialState? React - Redux
More Query from same tag
- Binding methods in react components
- Apply style to only one element of a map of elements
- best practices for dispatch an action and get the state from redux in same component?
- Checkbox based on array in React: controlled vs uncontrolled component
- How to configure next.config.js file on right way
- How to provide path to assets within a react project hosted on Firebase?
- React component rerender multiple times
- Errors when trying to validate password confirmation in React form with Joi
- React question(route component doesn't work in <Switch>)
- Redux Thunk Typescript Error On mapDispatchToProps
- React: Redirect based on flag: 'redirect' flag should be set to true, yet flag appears false at all times
- React, Express - GET data from database return array of objects, but I cant access to any object in array
- React Context API - create context from axios response
- Using a form within MaterialUI Grid
- Received `false` for a non-boolean attribute `loading`
- How do i reset a useref to null in react
- How to dynamically update the value for any input field with one event handler function, using hooks
- ReactJS sortable dnd tree setup
- Is there a way to get a download percentage from a fetch request in React?
- How to toggle the arrows when children is expanded / collapsed in 'cp-react-tree-table'
- Set model state with React Hooks in form inputs
- Fetch/TemplateLiteral issue passing Data in React
- Error when rendering React Portal with Storyshots
- How can I use cursor: Copy with event.preventDefault()?
- Semantic-UI-React: Form.Field is breaking layout
- Stub a async function using Jest in reactjs
- Why does useEffect dependencies on destructed props cause maximum update exceeded?
- Cannot propagate custom Select value to its parent component state
- Basic React Tests Failing after Implementing Redux
- warning: React Hook useEffect has a missing dependency