Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Production Build
BUILD_GRID_VERSION=35.1.0-beta.20260309.1858
BUILD_CHARTS_VERSION=13.1.0-beta.20260309
BUILD_GRID_VERSION=35.1.0-beta.20260312.1528
BUILD_CHARTS_VERSION=13.1.0-beta.20260312
ENV=local
NX_BATCH_MODE=true
NX_ADD_PLUGINS=false
Expand Down
2 changes: 1 addition & 1 deletion community-modules/locale/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ag-grid-community/locale",
"version": "35.1.0-beta.20260309.1858",
"version": "35.1.0-beta.20260312.1528",
"description": "Localisation Module for AG Grid, providing translations in 31 languages.",
"main": "./dist/package/main.cjs.js",
"types": "./dist/types/src/main.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion community-modules/styles/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ag-grid-community/styles",
"version": "35.1.0-beta.20260309.1858",
"version": "35.1.0-beta.20260312.1528",
"description": "AG Grid Styles and Themes",
"main": "_index.scss",
"files": [
Expand Down
24 changes: 12 additions & 12 deletions documentation/ag-grid-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "ag-grid-docs",
"description": "Documentation for AG Grid",
"type": "module",
"version": "35.1.0-beta.20260309.1858",
"version": "35.1.0-beta.20260312.1528",
"repository": {
"type": "git",
"url": "https://github.com/ag-grid/ag-grid.git"
Expand Down Expand Up @@ -53,17 +53,17 @@
"@types/react": "^18.2.47",
"@types/react-dom": "^18.2.18",
"@pqina/flip": "^1.8.4",
"ag-charts-angular": "13.1.0-beta.20260309",
"ag-charts-community": "13.1.0-beta.20260309",
"ag-charts-enterprise": "13.1.0-beta.20260309",
"ag-charts-types": "13.1.0-beta.20260309",
"ag-charts-react": "13.1.0-beta.20260309",
"ag-charts-vue3": "13.1.0-beta.20260309",
"ag-grid-angular": "35.1.0-beta.20260309.1858",
"ag-grid-community": "35.1.0-beta.20260309.1858",
"ag-grid-enterprise": "35.1.0-beta.20260309.1858",
"ag-grid-react": "35.1.0-beta.20260309.1858",
"ag-grid-vue3": "35.1.0-beta.20260309.1858",
"ag-charts-angular": "13.1.0-beta.20260312",
"ag-charts-community": "13.1.0-beta.20260312",
"ag-charts-enterprise": "13.1.0-beta.20260312",
"ag-charts-types": "13.1.0-beta.20260312",
"ag-charts-react": "13.1.0-beta.20260312",
"ag-charts-vue3": "13.1.0-beta.20260312",
"ag-grid-angular": "35.1.0-beta.20260312.1528",
"ag-grid-community": "35.1.0-beta.20260312.1528",
"ag-grid-enterprise": "35.1.0-beta.20260312.1528",
"ag-grid-react": "35.1.0-beta.20260312.1528",
"ag-grid-vue3": "35.1.0-beta.20260312.1528",
"algoliasearch": "^4.18.0",
"astro": "5.16.6",
"cheerio": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion documentation/update-algolia-indices/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "update-algolia-indices",
"version": "35.1.0-beta.20260309.1858",
"version": "35.1.0-beta.20260312.1528",
"description": "Update algolia indices",
"main": "src/index.ts",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ag-grid",
"version": "35.1.0-beta.20260309.1858",
"version": "35.1.0-beta.20260312.1528",
"license": "MIT",
"scripts": {
"compressVideo": "tsx external/ag-website-shared/scripts/compress-video",
Expand Down
6 changes: 3 additions & 3 deletions packages/ag-grid-angular/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ag-grid-angular",
"version": "35.1.0-beta.20260309.1858",
"version": "35.1.0-beta.20260312.1528",
"description": "AG Grid Angular Component",
"scripts": {
"clean": "rimraf dist",
Expand All @@ -15,7 +15,7 @@
"module": "./dist/ag-grid-angular/fesm2022/ag-grid-angular.mjs",
"typings": "./dist/ag-grid-angular/index.d.ts",
"dependencies": {
"ag-grid-community": "35.1.0-beta.20260309.1858",
"ag-grid-community": "35.1.0-beta.20260312.1528",
"@angular/animations": "^18.0.7",
"@angular/common": "^18.0.7",
"@angular/compiler": "^18.0.7",
Expand All @@ -27,7 +27,7 @@
"zone.js": "~0.15.1"
},
"devDependencies": {
"ag-grid-community": "35.1.0-beta.20260309.1858",
"ag-grid-community": "35.1.0-beta.20260312.1528",
"@angular-devkit/build-angular": "^18.0.7",
"@angular/cli": "^18.0.7",
"@angular/forms": "^18.0.7",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "ag-grid-angular",
"version": "35.1.0-beta.20260309.1858",
"version": "35.1.0-beta.20260312.1528",
"description": "AG Grid Angular Component",
"license": "MIT",
"peerDependencies": {
"@angular/common": ">= 18.0.0",
"@angular/core": ">= 18.0.0"
},
"dependencies": {
"ag-grid-community": "35.1.0-beta.20260309.1858",
"ag-grid-community": "35.1.0-beta.20260312.1528",
"tslib": "^2.3.0"
},
"repository": {
Expand Down
4 changes: 2 additions & 2 deletions packages/ag-grid-community/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ag-grid-community",
"version": "35.1.0-beta.20260309.1858",
"version": "35.1.0-beta.20260312.1528",
"description": "Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue",
"main": "./dist/package/main.cjs.js",
"types": "./dist/types/src/main.d.ts",
Expand Down Expand Up @@ -119,7 +119,7 @@
],
"homepage": "https://www.ag-grid.com/",
"dependencies": {
"ag-charts-types": "13.1.0-beta.20260309"
"ag-charts-types": "13.1.0-beta.20260312"
},
"devDependencies": {
"web-streams-polyfill": "^3.3.2",
Expand Down
6 changes: 0 additions & 6 deletions packages/ag-grid-community/src/agStack/utils/array.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
/**
* An array that is always empty and that cannot be modified
* @internal AG_GRID_INTERNAL - Not for public use. Can change / be removed at any time.
*/
export const _EmptyArray = Object.freeze([]) as unknown as any[];

/** @internal AG_GRID_INTERNAL - Not for public use. Can change / be removed at any time. */
export function _last<T>(arr: readonly T[]): T;
export function _last<T extends Node>(arr: NodeListOf<T>): T;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ import type { IRowNodeStage } from '../interfaces/iRowNodeStage';
import type { RowDataTransaction } from '../interfaces/rowDataTransaction';
import type { RowNodeTransaction } from '../interfaces/rowNodeTransaction';
import type { OverlayType } from '../rendering/overlays/overlayComponent';
import { ChangedPath } from '../utils/changedPath';
import type { ChangedPath } from '../utils/changedPath';
import { ChangedRowsPath, _forEachChangedGroupDepthFirst } from '../utils/changedPath';
import { _warn } from '../validation/logging';
import { ChangedRowNodes } from './changedRowNodes';
import { ClientSideNodeManager } from './clientSideNodeManager';
Expand Down Expand Up @@ -336,9 +337,7 @@ export class ClientSideRowModel extends BeanStub implements IClientSideRowModel,
}
}

private clearRowTopAndRowIndex(changedPath: ChangedPath, displayedRowsMapped: Set<string>): void {
const changedPathActive = changedPath.active;

private clearRowTopAndRowIndex(changedPath: ChangedPath | undefined, displayedRowsMapped: Set<string>): void {
const clearIfNotDisplayed = (rowNode?: RowNode) => {
if (rowNode?.id != null && !displayedRowsMapped.has(rowNode.id)) {
rowNode.clearRowTopAndRowIndex();
Expand All @@ -355,15 +354,11 @@ export class ClientSideRowModel extends BeanStub implements IClientSideRowModel,
return;
}

// if a changedPath is active, it means we are here because of a transaction update or
// a change detection. neither of these impacts the open/closed state of groups. so if
// a group is not open this time, it was not open last time. so we know all closed groups
// already have their top positions cleared. so there is no need to traverse all the way
// when changedPath is active and the rowNode is not expanded.
const isRootNode = rowNode.level == -1; // we need to give special consideration for root node,
// as expanded=undefined for root node
const skipChildren = changedPathActive && !isRootNode && !rowNode.expanded;
if (skipChildren) {
// When changedPath is provided, we are here because of a transaction update or
// a change detection. Neither of these impacts the open/closed state of groups. So if
// a group is not open this time, it was not open last time. So we know all closed groups
// already have their top positions cleared — no need to traverse further.
if (changedPath && rowNode.level !== -1 && !rowNode.expanded) {
return;
}
for (let i = 0, len = childrenAfterGroup.length; i < len; ++i) {
Expand Down Expand Up @@ -501,19 +496,6 @@ export class ClientSideRowModel extends BeanStub implements IClientSideRowModel,
this.refreshModel({ step: this.beans.colModel.isPivotActive() ? 'pivot' : 'aggregate' });
}

private createChangePath(enabled: boolean): ChangedPath {
// for updates, if the row is updated at all, then we re-calc all the values
// in that row. we could compare each value to each old value, however if we
// did this, we would be calling the valueSvc twice, once on the old value
// and once on the new value. so it's less valueGetter calls if we just assume
// each column is different. that way the changedPath is used so that only
// the impacted parent rows are recalculated, parents who's children have
// not changed are not impacted.
const changedPath = new ChangedPath(false, this.rootNode!);
changedPath.active = enabled;
return changedPath;
}

private isSuppressModelUpdateAfterUpdateTransaction(params: RefreshModelParams): boolean {
if (!this.gos.get('suppressModelUpdateAfterUpdateTransaction')) {
return false; // Not suppressed
Expand Down Expand Up @@ -556,7 +538,7 @@ export class ClientSideRowModel extends BeanStub implements IClientSideRowModel,
}

const rowDataUpdated = !!params.rowDataUpdated;
const changedPath = (params.changedPath ??= this.createChangePath(!params.newData && rowDataUpdated));
params.changedPath ??= !params.newData && rowDataUpdated ? new ChangedRowsPath() : undefined;

if (started && rowDataUpdated) {
eventSvc.dispatchEvent({ type: 'rowDataUpdated' });
Expand All @@ -581,7 +563,7 @@ export class ClientSideRowModel extends BeanStub implements IClientSideRowModel,
let succeeded = false;
this.refreshingModel = true; // Prevent nested refreshModel calls
try {
this.executeRefresh(params, changedPath, rowDataUpdated);
this.executeRefresh(params, rowDataUpdated);
succeeded = true;
} finally {
// Reset lock flags even on failure to prevent the grid from being stuck
Expand Down Expand Up @@ -609,27 +591,32 @@ export class ClientSideRowModel extends BeanStub implements IClientSideRowModel,
}

/** Executes the refresh pipeline stages and updates row positions. */
private executeRefresh(params: RefreshModelParams, changedPath: ChangedPath, rowDataUpdated: boolean): void {
private executeRefresh(params: RefreshModelParams, rowDataUpdated: boolean): void {
const { beans } = this;

beans.masterDetailSvc?.refreshModel(params);
if (rowDataUpdated && params.step !== 'group') {
beans.colFilter?.refreshModel();
}

// this goes through the pipeline of stages. what's in my head is similar to the diagram on this page:
// http://commons.apache.org/sandbox/commons-pipeline/pipeline_basics.html
// however we want to keep the results of each stage, hence we manually call each step
// rather than have them chain each other.
// fallthrough in below switch is on purpose, eg if STEP_FILTER, then all steps after runs too
let changedPath = params.changedPath;

// Ensure the root node is always visited by pipeline stages even for empty transactions.
changedPath?.addRow(this.rootNode);

// Pipeline of stages — fallthrough is on purpose, e.g. if 'filter', then all steps after run too.
/* eslint-disable no-fallthrough */
switch (params.step) {
case 'group':
this.doGrouping(params);
case 'filter':
this.doFilter(changedPath);
case 'pivot':
this.doPivot(changedPath);
// Pivot may signal that columns changed, requiring full traversal for subsequent stages.
if (this.doPivot(changedPath)) {
changedPath = undefined;
params.changedPath = undefined;
}
case 'aggregate': // depends on agg fields
this.doAggregate(changedPath);
case 'filter_aggregates':
Expand Down Expand Up @@ -940,14 +927,14 @@ export class ClientSideRowModel extends BeanStub implements IClientSideRowModel,
}

// it's possible to recompute the aggregate without doing the other parts + api.refreshClientSideRowModel('aggregate')
public doAggregate(changedPath: ChangedPath): void {
public doAggregate(changedPath: ChangedPath | undefined): void {
const rootNode = this.rootNode;
if (rootNode) {
this.beans.aggStage?.execute(changedPath);
}
}

private doFilterAggregates(changedPath: ChangedPath): void {
private doFilterAggregates(changedPath: ChangedPath | undefined): void {
const rootNode = this.rootNode!;
const filterAggStage = this.beans.filterAggStage;
if (filterAggStage) {
Expand All @@ -958,13 +945,13 @@ export class ClientSideRowModel extends BeanStub implements IClientSideRowModel,
rootNode.childrenAfterAggFilter = rootNode.childrenAfterFilter;
}

private doSort(changedPath: ChangedPath, changedRowNodes: ChangedRowNodes | undefined): void {
private doSort(changedPath: ChangedPath | undefined, changedRowNodes: ChangedRowNodes | undefined): void {
const sortStage = this.beans.sortStage;
if (sortStage) {
sortStage.execute(changedPath, changedRowNodes);
return;
}
changedPath.forEachChangedNodeDepthFirst((rowNode) => {
_forEachChangedGroupDepthFirst(this.rootNode, changedPath, (rowNode) => {
rowNode.childrenAfterSort = rowNode.childrenAfterAggFilter!.slice(0);
updateRowNodeAfterSort(rowNode);
});
Expand Down Expand Up @@ -995,20 +982,21 @@ export class ClientSideRowModel extends BeanStub implements IClientSideRowModel,
}
}

private doFilter(changedPath: ChangedPath): void {
private doFilter(changedPath: ChangedPath | undefined): void {
const filterStage = this.beans.filterStage;
if (filterStage) {
filterStage.execute(changedPath);
return;
}
changedPath.forEachChangedNodeDepthFirst((rowNode) => {
_forEachChangedGroupDepthFirst(this.rootNode, changedPath, (rowNode) => {
rowNode.childrenAfterFilter = rowNode.childrenAfterGroup;
updateRowNodeAfterFilter(rowNode);
}, true);
});
}

private doPivot(changedPath: ChangedPath) {
this.beans.pivotStage?.execute(changedPath);
/** Returns `true` if pivot columns changed and changedPath should be deactivated. */
private doPivot(changedPath: ChangedPath | undefined): boolean {
return this.beans.pivotStage?.execute(changedPath) ?? false;
}

public getRowNode(id: string): RowNode | undefined {
Expand Down Expand Up @@ -1112,7 +1100,7 @@ export class ClientSideRowModel extends BeanStub implements IClientSideRowModel,
keepRenderedRows: true,
animate,
changedRowNodes,
changedPath: this.createChangePath(true),
changedPath: new ChangedRowsPath(),
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const doDeltaSort = (
rowNodeSorter: RowNodeSorter,
rowNode: RowNode,
changedRowNodes: ChangedRowNodes,
changedPath: ChangedPath,
changedPath: ChangedPath | undefined,
sortOptions: SortOption[]
): RowNode[] => {
const oldSortedRows = rowNode.childrenAfterSort;
Expand All @@ -51,7 +51,6 @@ export const doDeltaSort = (
}

if (!oldSortedRows || unsortedRowsLen <= MIN_DELTA_SORT_ROWS) {
// No previous sort, or just too few elements, do full sort
return rowNodeSorter.doFullSortInPlace(unsortedRows.slice(), sortOptions);
}

Expand All @@ -63,7 +62,7 @@ export const doDeltaSort = (
const touchedRows: RowNode[] = [];
for (let i = 0; i < unsortedRowsLen; ++i) {
const node = unsortedRows[i];
if (updates.has(node) || adds.has(node) || !changedPath.canSkip(node)) {
if (updates.has(node) || adds.has(node) || !changedPath || changedPath.hasRow(node)) {
indexByNode.set(node, ~i); // Bitwise NOT for touched (negative)
touchedRows.push(node);
} else {
Expand Down
Loading
Loading