MCPcopy Create free account
hub / github.com/AllenFang/react-bootstrap-table / add

Method add

src/store/TableDataStore.js:231–241  ·  view source on GitHub ↗
(newObj)

Source from the content-addressed store, hash-verified

229 }
230
231 add(newObj) {
232 const e = this.isValidKey(newObj[this.keyField]);
233 if (e) throw new Error(e);
234
235 const currentDisplayData = this.getCurrentDisplayData();
236 currentDisplayData.push(newObj);
237 if (this.isOnFilter) {
238 this.data.push(newObj);
239 }
240 this._refresh(false);
241 }
242
243 isValidKey = key => {
244 if (key === null || key === undefined || key.toString() === '') {

Callers 1

afterAddRowCBFunction · 0.80

Calls 2

getCurrentDisplayDataMethod · 0.95
_refreshMethod · 0.95

Tested by

no test coverage detected