Fix dropdown display value not showing if its different type e.g. number/string

This commit is contained in:
ShootingStar91
2024-06-05 14:55:43 +03:00
parent 5a78192f6e
commit 0ffe1e16be
@@ -133,7 +133,7 @@ const MultiSelector = <T extends object>({
editingComponent: ReactNode
}) => {
const { data } = useDetailContext<T>()
const option = options.find(option => getValue(option) === data[field])
const option = options.find(option => getValue(option) == data[field]) // intentional use of ==
const displayValue = option ? getDisplay(option) : null
return <DataValue<T> field={field} EditElement={editingComponent} displayValue={displayValue} />
}