Skip to content

Commit 8ad7997

Browse files
author
hikki
committed
1.5
1 parent bc335bd commit 8ad7997

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

resources/assets/component.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,15 +171,15 @@ class ComponentLine {
171171
DATA_INPUT;
172172
SORTABLE;
173173

174-
constructor(name, columns, data, options) {
174+
constructor(name, columns, data, options={}) {
175175
this.DOM = document.getElementById(name);
176176
this.NAME = name;
177177
this.COLUMNS = columns;
178178
this.DATA = data;
179179
this.OPTIONS = Object.assign({
180180
sortable: true,
181181
delete: true,
182-
}, options || {});
182+
}, options);
183183
/*head foot*/
184184
let foot = this.makeHead();
185185
/*hidden data container*/
@@ -193,7 +193,7 @@ class ComponentLine {
193193
/*foot*/
194194
this.makeFoot(foot);
195195
/*sort*/
196-
this.sortable();
196+
if(this.OPTIONS.sortable) this.sortable();
197197
}
198198

199199
makeHead() {

0 commit comments

Comments
 (0)