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 = {
127127 return this ;
128128 } ,
129129 /* 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+ }
138139
139- // return this;
140- // },
140+ return this ;
141+ } ,
141142 // _updateItem(obj) {
142143 // if (this.index === -1) {
143144 // console.warn('Please use .get(dataElement) first before using update');
@@ -151,11 +152,11 @@ const Header = {
151152
152153 // return this;
153154 // },
154- // _updateItems(items) {
155- // this.headers[this.headerGroup] = items;
155+ _updateItems ( items ) {
156+ this . headers [ this . headerGroup ] = items ;
156157
157- // return this;
158- // },
158+ return this ;
159+ } ,
159160 _setIndex ( dataElement ) {
160161 this . index = this . _getIndexOfElement ( dataElement ) ;
161162 } ,
You can’t perform that action at this time.
0 commit comments