parent
48b8dfe973
commit
f97be4e729
@ -13,6 +13,7 @@
|
|||||||
export let current_donations;
|
export let current_donations;
|
||||||
const getDonorLabel = (option) =>
|
const getDonorLabel = (option) =>
|
||||||
option.firstname + " " + (option.middlename || "") + " " + option.lastname;
|
option.firstname + " " + (option.middlename || "") + " " + option.lastname;
|
||||||
|
const filterDonors = (label, filterText, option) => (label.toLowerCase().includes(filterText.toLowerCase()) || option.id.toString().startsWith(filterText.toLowerCase()));
|
||||||
function focus(el) {
|
function focus(el) {
|
||||||
el.focus();
|
el.focus();
|
||||||
}
|
}
|
||||||
@ -212,6 +213,7 @@
|
|||||||
containerClasses="rounded-l-md mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm rounded-l-md sm:text-sm border-gray-300 border bg-gray-50 text-gray-500 rounded-md p-2"
|
containerClasses="rounded-l-md mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm rounded-l-md sm:text-sm border-gray-300 border bg-gray-50 text-gray-500 rounded-md p-2"
|
||||||
getSelectionLabel= {(option) => (getDonorLabel(option))}
|
getSelectionLabel= {(option) => (getDonorLabel(option))}
|
||||||
getOptionLabel= {(option) => (getDonorLabel(option))}
|
getOptionLabel= {(option) => (getDonorLabel(option))}
|
||||||
|
itemFilter = {(label, filterText, option) => filterDonors(label, filterText, option)}
|
||||||
items={donors}
|
items={donors}
|
||||||
showChevron={true}
|
showChevron={true}
|
||||||
placeholder="Search for donor..."
|
placeholder="Search for donor..."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user