Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
435 views
in Technique[技术] by (71.8m points)

javascript - 如何在不进行远程调用的情况下过滤当前数据? -物料表(mbrn /物料表)(How to filter current data without making remote call? - Material Table(mbrn/material-table))

I am using mbrn/material-table with filtering on a column and remote data feature.(我正在将mbrn / material-table与列和远程数据功能一起使用进行过滤。)

When I filter by a term, the table makes an API call to the server with filter criteria in query object.(当我按术语进行过滤时,该表会使用查询对象中的过滤条件对服务器进行API调用。) My expectation here is that on typing filter term I want the table to search in the current dataset on the current page.(我的期望是,在键入过滤器术语时,我希望表在当前页面的当前数据集中进行搜索。) I do not want the table to make an extra call for filtering.(我不希望该表进行额外的筛选。) It should show only rows that match the term.(它应仅显示与该术语匹配的行。)

Any suggestions on how can I achieve this?(关于如何实现此目标的任何建议?)

Check the link https://stackblitz.com/edit/aftkrc Open editor console to see API is being called on every filter text.(检查链接https://stackblitz.com/edit/aftkrc打开编辑器控制台,以查看在每个过滤器文本上都正在调用API。)

  ask by LAXIT KUMAR translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

Please log in or register to answer this question.

Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...