mirror of
https://github.com/nowcommunity/nowdatabase.git
synced 2026-10-12 19:13:52 +03:00
Fix dropdown display value not showing if its different type e.g. number/string
This commit is contained in:
@@ -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} />
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user