Tag Archives: Cannot use ‘in’ operator to search for ‘value’ in undefined

[Solved] ant Error: Cannot use ‘in’ operator to search for ‘value’ in undefined

ant Error:  Cannot use ‘in’ operator to search for ‘value’ in undefined  at getValuePropValue (util.js:29)
When using the multi-select Select component again, an error is reported as shown in the figure

The reason is because the value is assigned before the options is rendered.

let children = List.length && List.map((item) => {
            return{item.userName}
        })

Delete the Bold codes as follow:

1 let children =  shapeExpertsList.map((item) => {
2             return <Option name={item.userName} key={item.userId} value={item.userId} >{item.userName}</Option>
3         }