File tree Expand file tree Collapse file tree 1 file changed +15
-14
lines changed Expand file tree Collapse file tree 1 file changed +15
-14
lines changed Original file line number Diff line number Diff line change @@ -127,17 +127,18 @@ const Header = {
127
127
return this ;
128
128
} ,
129
129
/* rethink update later */
130
- // update(arg) {
131
- // if (typeof arg === 'object') {
132
- // this._updateItem(arg);
133
- // } else if (Array.isArray(arg)) {
134
- // this._updateItems(arg);
135
- // } else {
136
- // console.warn('Argument must be either an object or an array');
137
- // }
130
+ update ( arg ) {
131
+ // if (typeof arg === 'object') {
132
+ // this._updateItem(arg);
133
+ // }
134
+ if ( Array . isArray ( arg ) ) {
135
+ this . _updateItems ( arg ) ;
136
+ } else {
137
+ console . warn ( 'Argument must be an array' ) ;
138
+ }
138
139
139
- // return this;
140
- // },
140
+ return this ;
141
+ } ,
141
142
// _updateItem(obj) {
142
143
// if (this.index === -1) {
143
144
// console.warn('Please use .get(dataElement) first before using update');
@@ -151,11 +152,11 @@ const Header = {
151
152
152
153
// return this;
153
154
// },
154
- // _updateItems(items) {
155
- // this.headers[this.headerGroup] = items;
155
+ _updateItems ( items ) {
156
+ this . headers [ this . headerGroup ] = items ;
156
157
157
- // return this;
158
- // },
158
+ return this ;
159
+ } ,
159
160
_setIndex ( dataElement ) {
160
161
this . index = this . _getIndexOfElement ( dataElement ) ;
161
162
} ,
You can’t perform that action at this time.
0 commit comments