Sunday, 15 March 2015

DataTables/jQuery UI Tabs header width bug -


Then there is a famous bug with DataTables + jQuery UI tabs, where the column headers are not handled properly due to data hal It is initially hidden, it prevents the sort icon from being displayed as a screen out of the width -

In the above link, it determines that in this tab, fix it with the on activated method:

  $ ("# Tab "). Activate: function (event, UI) {$ ("#image"). Datatale (.columns.adjust (); chrome.storage.local.set ({" CurrentTabIdx ": ui.newPanel [0] .dataset [" tabIndex "]});}});  

However, as you can see that I am saving that tab that was selected so that when the user reloads the page, the same tab was left Which was open.

At the reload, the tab that was selected shows that the activate is not an incident, because the tab is not selected, only loaded.

I have tried to adjust the column inside active , load , create methods, but nothing works Does

Is this the solution?

I create 3 tabs with each of my datasets, I use Scrolling as shown in the link from Datatables.net Use it here

  $ (document) .ready (function () {// In this section the data is set and the data is based on dtdata = JSON.parse (f) Column creates defintion.); Var key = object.kiz (dtdata.data [0]); Var column = []; $ .eEE (keys, functions (i, items) {column.push ({data: item, title: item, name: item}}}); // If it is there then get storage value then tab versus var ls = localStorage.getItem ("currentTabIdx"); If (ls === null) {ls = 1; LocalStorage.setItem ("tabs (active: ls-1, active: function (evt, ui) {var idx = ui.newPanel.index (); localStorage.setItem (" current tabidax ", idx);} CurrentTabIdx", Idx); if (! $ .fn.DataTable.isDataTable ("# table" + idx)) {$ ("# table" + idx) .DataTable ({Data: dtdata.Data, Columns: Columns, Order: [ Idx, "asc"]], scroll: 200, scroll escape: true, paging: wrong});}}}); // Getting highlighted table $ ("# Tables" + LocalStorageGet Item ("CurrentTabIdx")) Datatelle ({Data: dtdata.data, Columns: Columns, Order: [[LS, "ACC"]], Scroll: 200, Scroll Migration: True, Paging: Incorrect}); });  

No comments:

Post a Comment