This pull request introduces a new function, searchBothFieldFunction, to the labelField and valueField components. This function allows for more flexible and efficient searching by enabling users to search for values that match either the label or the value field.
Key changes:
Added searchBothFieldFunction property: This property is added to both labelField and valueField components. It takes a function as input, which will be called with the search query and the current item being searched. The function should return true if the item matches the search query, and false otherwise.
Updated search logic: The search logic in both components is modified to use the searchBothFieldFunction if it's provided. If the function is not provided, the default search behavior remains unchanged.
Empty result message: The empty result message is updated to "No Result Found."
Benefits:
Enhanced search functionality: Users can now search for values based on either the label or the value field, providing more flexibility and accuracy in their searches.
Improved efficiency: The searchBothFieldFunction can be customized to optimize search performance for specific use cases.
Increased usability: The added search functionality makes it easier for users to find the information they need.
This pull request introduces a new function,
searchBothFieldFunction
, to thelabelField
andvalueField
components. This function allows for more flexible and efficient searching by enabling users to search for values that match either thelabel
or thevalue
field.Key changes:
searchBothFieldFunction
property: This property is added to bothlabelField
andvalueField
components. It takes a function as input, which will be called with the search query and the current item being searched. The function should returntrue
if the item matches the search query, andfalse
otherwise.searchBothFieldFunction
if it's provided. If the function is not provided, the default search behavior remains unchanged."No Result Found."
Benefits:
label
or thevalue
field, providing more flexibility and accuracy in their searches.searchBothFieldFunction
can be customized to optimize search performance for specific use cases.