Resolve search select.

This commit is contained in:
Patrick Fic
2024-03-21 11:58:00 -07:00
parent 23f9f8fa20
commit cd9e67c9df

View File

@@ -36,9 +36,8 @@ const VendorSearchSelect = (
width: '100%',
}}
labelRender={({ label, value, ...rest }) => {
console.log(value, label, rest);
if (!value) return label;
const discount = options.find((o) => o.id === value)?.discount;
if (!value || !options) return label;
const discount = options?.find((o) => o.id === value)?.discount;
return (
<div className="imex-flex-row" style={{ width: '100%' }}>
<div style={{ flex: 1 }}>{label}</div>