@mskcc/carbon-react
Version:
Carbon react components for the MSKCC DSM
19 lines (16 loc) • 329 B
JavaScript
/**
* MSKCC 2021, 2024
*/
const defaultFilterItems = (items, _ref) => {
let {
itemToString,
inputValue
} = _ref;
return items.filter(item => {
if (!inputValue) {
return true;
}
return itemToString(item).toLowerCase().includes(inputValue.toLowerCase());
});
};
export { defaultFilterItems };