@onehat/data 1.19.38 → 1.19.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/Repository/OneBuild.js +14 -0
package/package.json
CHANGED
|
@@ -346,6 +346,20 @@ class OneBuildRepository extends AjaxRepository {
|
|
|
346
346
|
return duplicateEntity;
|
|
347
347
|
}
|
|
348
348
|
|
|
349
|
+
loadOneAdditionalEntity = async (id) => {
|
|
350
|
+
const entity = await this.getSingleEntityFromServer(id);
|
|
351
|
+
if (!entity) {
|
|
352
|
+
this.throwError('entity not found');
|
|
353
|
+
return;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
this._relayEntityEvents(entity);
|
|
357
|
+
this.entities.push(entity);
|
|
358
|
+
this.total++;
|
|
359
|
+
this._setPaginationVars();
|
|
360
|
+
this.emit('changeData', this.entities);
|
|
361
|
+
}
|
|
362
|
+
|
|
349
363
|
getSingleEntityFromServer = async (id) => {
|
|
350
364
|
if (this.isDestroyed) {
|
|
351
365
|
this.throwError('this.getSingleEntityFromServer is no longer valid. Repository has been destroyed.');
|