IO-1329 Filtering on bill line posting
This commit is contained in:
@@ -12,7 +12,18 @@ const BillLineSearchSelect = ({ options, disabled, ...restProps }, ref) => {
|
|||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
ref={ref}
|
ref={ref}
|
||||||
showSearch
|
showSearch
|
||||||
optionFilterProp="line_desc"
|
// optionFilterProp="line_desc"
|
||||||
|
filterOption={(inputValue, option) => {
|
||||||
|
console.log(inputValue);
|
||||||
|
return (
|
||||||
|
(option.line_desc &&
|
||||||
|
option.line_desc
|
||||||
|
.toLowerCase()
|
||||||
|
.includes(inputValue.toLowerCase())) ||
|
||||||
|
(option.oem_partno &&
|
||||||
|
option.oem_partno.toLowerCase().includes(inputValue.toLowerCase()))
|
||||||
|
);
|
||||||
|
}}
|
||||||
notFoundContent={"Removed."}
|
notFoundContent={"Removed."}
|
||||||
{...restProps}
|
{...restProps}
|
||||||
>
|
>
|
||||||
@@ -29,6 +40,7 @@ const BillLineSearchSelect = ({ options, disabled, ...restProps }, ref) => {
|
|||||||
part_type={item.part_type}
|
part_type={item.part_type}
|
||||||
line_desc={item.line_desc}
|
line_desc={item.line_desc}
|
||||||
part_qty={item.part_qty}
|
part_qty={item.part_qty}
|
||||||
|
oem_partno={item.oem_partno}
|
||||||
style={{
|
style={{
|
||||||
...(item.removed ? { textDecoration: "line-through" } : {}),
|
...(item.removed ? { textDecoration: "line-through" } : {}),
|
||||||
}}
|
}}
|
||||||
|
|||||||
Reference in New Issue
Block a user