Closed ahsanparacha02 closed 2 years ago
How did you fix this issue? I have the same error @ahsanparacha02
u must add value and key property in your json list like this
res.response.list.map((item, index) => {
tempList.push({
...item,
value: item.member_username,
key: item.friend_id,
});
})
@ahsanparacha02 But what if my value is null from API, it shows this same error
// Map the data to key-value structure
const mappedEventUsers = apiData.map((user) => ({
key: user.id.toString(),
value: user.name,
...user,
}));
setEventUsers(mappedEventUsers);
How did you fix this issue? I have the same error @ahsanparacha02