@maherunlocker/custom-react-table
Version:
dynamic table based on react table v7
13 lines • 520 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.fuzzyTextFilter = void 0;
const match_sorter_1 = require("match-sorter");
function fuzzyTextFilter(rows, id, filterValue) {
return (0, match_sorter_1.matchSorter)(rows, filterValue, {
keys: [(row) => row.values[id]],
});
}
exports.fuzzyTextFilter = fuzzyTextFilter;
// Let the table remove the filter if the string is empty
fuzzyTextFilter.autoRemove = (val) => !val;
//# sourceMappingURL=fuzzyFilter.js.map