根据关键词或自定义Hook过滤列表,支持根据数据对象的嵌套路径过滤,如: 'user.name'
const keyword = 'test';const fields = ['username', 'email', 'phone'];// 过滤列表,关键词搜索和自定义hook为或的关系listFilter(list, {keyword, fields, relationOr: true, filterHook: (row) => { return age > 18;}})// 关键词搜索和自定义hook为且的关系listFilter(list, {keyword, fields, filterHook: (row) => { return age > 18;}}) Copy
const keyword = 'test';const fields = ['username', 'email', 'phone'];// 过滤列表,关键词搜索和自定义hook为或的关系listFilter(list, {keyword, fields, relationOr: true, filterHook: (row) => { return age > 18;}})// 关键词搜索和自定义hook为且的关系listFilter(list, {keyword, fields, filterHook: (row) => { return age > 18;}})
数据列表
过滤选项
根据关键词或自定义Hook过滤列表,支持根据数据对象的嵌套路径过滤,如: 'user.name'
Example