import { matchSorter } from 'match-sorter' ; import { FilterValue , IdType , Row } from 'react-table' ; export function fuzzyTextFilter < T extends Record < string , unknown > > ( rows , id , filterValue ) { return matchSorter ( rows , filterValue , { keys : [ ( row ) => row . values [ id ] ] , } ) ; } fuzzyTextFilter . autoRemove = ( val ) => ! val ;