Datatables dynamically hide / show a column too slowly

My goal is to dynamically display / hide columns using jQuery datatables plugins. When I have about 500 lines, this takes forever. I am using the new Datatables 1.10.0 API.

$('#oats-detailed-view-button').click(function (e) {
                e.preventDefault();
                oatsTable.columns([6,7,8,9,10,11,12]).visible(true);
            });

Is there a more efficient way to do this?

+4
source share
1 answer

Having performance issues, I suggest generally about these steps:

  • delete unnecessary data
  • change service object parameters
  • try using the service object differently.
  • Workaround and debugging of the service object (if open source, i.e. inform the manufacturer about the results)

1: , , , ?

2: autoWidth false, . jQuery

API DataTables , : deferRender: http://datatables.net/reference/option/deferRender β†’ ? , HTML-, ?

, DataTables/FAQ : http://datatables.net/faqs/index ( "DataTables " ).

3 4: , html div . div 1 1 5, div 2 6 12. , div 2, /. , visibiliy:hidden, display:none, .

+1

Source: https://habr.com/ru/post/1546324/


All Articles