简体   繁体   English

数据表在另一个 object 上应用搜索

[英]Datatable apply search on another object

I have a requirement to load 70K JSON objects in UI.我需要在 UI 中加载 70K JSON 对象。 If I try sending those objects to Datatable the UI is getting crashed.如果我尝试将这些对象发送到 Datatable,那么 UI 就会崩溃。 So what I did is I am slicing the data and showing 1000 records.所以我所做的是对数据进行切片并显示 1000 条记录。 I need to implement a logic that, if I search on top of that table, I need to apply search on the object which has 70K JSON object and not the object which is shown in data table. I need to implement a logic that, if I search on top of that table, I need to apply search on the object which has 70K JSON object and not the object which is shown in data table. Is that possible in Datatables?在数据表中可能吗?

If you mean jQuery Datatables - yeah, it's possible.如果您的意思是jQuery 数据表- 是的,这是可能的。 Based on documentation :基于文档

Server-side processing as discussed above is a special form of Ajax sourced data, whereby the data to be shown for each page in the DataTable is retrieved by an Ajax request only when that page is required for display to the user.上面讨论的服务器端处理是 Ajax 源数据的一种特殊形式,仅当需要向用户显示该页面时,才通过 Ajax 请求检索要在 DataTable 中显示的每个页面的数据。 This allows the power of the database engine on servers to be utilised for large data sets.这允许将服务器上的数据库引擎的功能用于大型数据集。 For more information about server-side processing, and how it can be implemented, please refer to its documentation in this manual.有关服务器端处理以及如何实现的更多信息,请参阅本手册中的文档。

By sending start and length values (more details here ) you can adjust what records to show and how many of them.通过发送startlength值(此处有更多详细信息),您可以调整要显示的记录以及它们的数量。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM