File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
django_dyn_dt/templates/static/src Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -155,11 +155,11 @@ export const columnsManage = (dataTable) => {
155155
156156 const id = myData . headings . indexOf ( e . target . closest ( 'input' ) . id )
157157 if ( e . target . closest ( 'input' ) . checked ) {
158- dataTable . columns ( ) . hide ( [ parseInt ( id ) ] )
158+ dataTable . columns . hide ( [ parseInt ( id ) ] )
159159 const hideColumns = JSON . parse ( localStorage . getItem ( 'hideColumns' ) ) || [ ]
160160 localStorage . setItem ( 'hideColumns' , JSON . stringify ( [ ...hideColumns , e . target . closest ( 'input' ) . id ] ) )
161161 } else {
162- dataTable . columns ( ) . show ( [ parseInt ( id ) ] )
162+ dataTable . columns . show ( [ parseInt ( id ) ] )
163163 const hideColumns = JSON . parse ( localStorage . getItem ( 'hideColumns' ) ) || [ ]
164164 localStorage . setItem ( 'hideColumns' , JSON . stringify ( hideColumns . filter ( d => d !== e . target . closest ( 'input' ) . id ) ) )
165165 }
@@ -212,7 +212,7 @@ export const exportData = (dataTable, type) => {
212212
213213 const searchParam = new URLSearchParams ( window . location . search ) . get ( 'search' ) || ''
214214
215- const hiddenColumns = myData . headings . filter ( ( d , i ) => ! dataTable . columns ( ) . visible ( i ) )
215+ const hiddenColumns = myData . headings . filter ( ( d , i ) => ! dataTable . columns . visible ( i ) )
216216
217217 fetch ( `/datatb/${ modelName } /export/` ,
218218 { method : 'POST' , body : JSON . stringify ( {
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ myData.data.forEach((d,i) => {
3939 newColumn . push ( editBtn + " " + removeBtn )
4040} )
4141 // add buttons
42- dataTable . columns ( ) . add ( {
42+ dataTable . columns . add ( {
4343 heading : '' ,
4444 data : newColumn
4545} )
@@ -66,7 +66,7 @@ window.onload = () => {
6666
6767 const hideColumns = JSON . parse ( localStorage . getItem ( 'hideColumns' ) )
6868 hideColumns . forEach ( d => {
69- dataTable . columns ( ) . hide ( [ myData . headings . indexOf ( d ) ] )
69+ dataTable . columns . hide ( [ myData . headings . indexOf ( d ) ] )
7070 } )
7171
7272 const els = document . getElementsByClassName ( 'form-check-input' )
You can’t perform that action at this time.
0 commit comments