@adaptabletools/adaptable-plugin-master-detail-aggrid 23.0.4 → 23.0.5-canary.0

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable-plugin-master-detail-aggrid",
3
- "version": "23.0.4",
3
+ "version": "23.0.5-canary.0",
4
4
  "description": "",
5
5
  "homepage": "http://www.adaptabletools.com/",
6
6
  "author": {
@@ -1,6 +1,4 @@
1
1
  import { AdaptableAgGrid } from '@adaptabletools/adaptable/src/agGrid/AdaptableAgGrid';
2
- // @ts-ignore because we override the private setDetailGrid() method
3
- // TODO: add interface to implement
4
2
  export class DetailCellRenderer {
5
3
  adaptableApi;
6
4
  adaptableDestroyed = false;
@@ -13,7 +11,6 @@ export class DetailCellRenderer {
13
11
  this.eGui = document.createElement('div');
14
12
  this.eGui.classList.add('ag-details-row');
15
13
  this.eGui.classList.add('ag-details-row-fixed-height');
16
- // Ag Grid logic
17
14
  const agGridContainer = document.createElement('div');
18
15
  this.eGui.appendChild(agGridContainer);
19
16
  const masterAdaptable = params.context.__adaptable;
@@ -22,19 +19,15 @@ export class DetailCellRenderer {
22
19
  detailGridOptions.detailCellRenderer = DetailCellRenderer;
23
20
  const agGridTheme = masterAdaptable.agGridAdapter.getGridOption('theme');
24
21
  detailGridOptions.theme = agGridTheme;
25
- // Adaptable logic
26
22
  const adaptableContainerId = `adaptable-detail-${params.node?.rowIndex}`;
27
23
  const adaptableContainer = document.createElement('div');
28
24
  adaptableContainer.id = adaptableContainerId;
29
- // Attach Adaptable
30
25
  this.eGui.prepend(adaptableContainer);
31
26
  const initialState = detailAdaptableOptions.initialState;
32
- // AG Grid modules are already registered
33
27
  const agGridModules = masterAdaptable.agGridModulesAdapter.getAgGridRegisteredModules();
34
28
  this.adaptableApi = await AdaptableAgGrid._initInternal({
35
29
  adaptableOptions: {
36
30
  licenseKey: masterAdaptable.api.optionsApi.getLicenseKey(),
37
- // provide adaptableId just in case, but normally it should be provided by the user in detailAdaptableOptions
38
31
  adaptableId: `${masterAdaptable.adaptableOptions.adaptableId} Detail`,
39
32
  ...detailAdaptableOptions,
40
33
  initialState: {
@@ -97,10 +90,6 @@ export class DetailCellRenderer {
97
90
  this.adaptableApi = undefined;
98
91
  }
99
92
  }
100
- /**
101
- * Code mostly copied over from https://github.com/ag-grid/ag-grid/blob/latest/enterprise-modules/master-detail/src/masterDetail/detailCellRendererCtrl.ts#L142
102
- * So the detail grid works with the ag-grid api
103
- */
104
93
  loadRowData() {
105
94
  this.loadRowDataVersion++;
106
95
  const versionThisCall = this.loadRowDataVersion;