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
5 changes: 3 additions & 2 deletions .nxignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Needed to avoid nx format failing on symlinks.
.rulesync/
# Ignore .rulesync symlinks as nx format doesn't handle these well.
.rulesync/**
!.rulesync/README.md
.patches/
patches/

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
@use 'ag';

@mixin output {
:where(.ag-column-panel.ag-column-panel-deferred),
:where(.ag-column-panel.ag-column-panel-deferred) :where(.ag-column-panel-column-select),
:where(.ag-column-panel.ag-column-panel-deferred) :where(.ag-column-drop-vertical),
:where(.ag-column-panel.ag-column-panel-deferred) :where(.ag-column-panel-defer-mode-toggle),
:where(.ag-column-panel.ag-column-panel-deferred) :where(.ag-column-panel-buttons) {
background-color: var(--ag-cell-batch-edit-background-color);
}

.ag-pivot-mode-panel {
min-height: var(--ag-header-height);
height: var(--ag-header-height);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,7 @@
"spacing": {},
"fontFamily": {},
"fontSize": {},
"fontWeight": {},
"borderColor": {},
"borderWidth": {},
"borderRadius": {},
"headerHeight": {},
"rowHeight": {},
"browserColorScheme": {}
"fontWeight": {}
},
"colours": {
"meta": {
Expand All @@ -34,7 +28,8 @@
"textColor": {},
"chromeBackgroundColor": {},
"invalidColor": {},
"subtleTextColor": {}
"subtleTextColor": {},
"browserColorScheme": {}
},
"spacingAndSizing": {
"meta": {
Expand All @@ -44,6 +39,8 @@
"url": "./theming-compactness/"
}
},
"headerHeight": {},
"rowHeight": {},
"listItemHeight": {},
"paginationPanelHeight": {},
"widgetContainerHorizontalPadding": {},
Expand All @@ -59,6 +56,9 @@
"url": "./theming-borders/"
}
},
"borderColor": {},
"borderWidth": {},
"borderRadius": {},
"wrapperBorder": {},
"wrapperBorderRadius": {},
"columnBorder": {},
Expand Down Expand Up @@ -187,7 +187,6 @@
},
"iconColor": {},
"iconSize": {},
"dragHandleColor": {},
"iconButtonColor": {},
"iconButtonBackgroundColor": {},
"iconButtonBackgroundSpread": {},
Expand Down Expand Up @@ -299,7 +298,8 @@
"panelTitleBarFontWeight": {},
"panelTitleBarHeight": {},
"panelTitleBarBorder": {},
"panelTitleBarIconColor": {}
"panelTitleBarIconColor": {},
"columnSelectIndentSize": {}
},
"dragAndDrop": {
"meta": {
Expand All @@ -313,7 +313,8 @@
"dragAndDropImageBackgroundColor": {},
"dragAndDropImageBorder": {},
"dragAndDropImageShadow": {},
"dragAndDropImageNotAllowedBorder": {}
"dragAndDropImageNotAllowedBorder": {},
"dragHandleColor": {}
},
"tooltips": {
"meta": {
Expand Down Expand Up @@ -457,7 +458,6 @@
"filterPanelApplyButtonColor": {},
"filterPanelCardSubtleColor": {},
"filterPanelCardSubtleHoverColor": {},
"columnSelectIndentSize": {},
"filterToolPanelGroupIndent": {},
"setFilterIndentSize": {}
},
Expand All @@ -476,34 +476,34 @@
"advancedFilterBuilderButtonBarBorder": {},
"advancedFilterBuilderIndentSize": {}
},
"formulaBar": {
"formulas": {
"meta": {
"displayName": "Formula Bar",
"displayName": "Formulas",
"page": {
"name": "Formulas",
"url": "./formulas/"
}
},
"formulaToken1BackgroundColor": {},
"formulaToken1Color": {},
"formulaToken1Border": {},
"formulaToken2BackgroundColor": {},
"formulaToken2Color": {},
"formulaToken2Border": {},
"formulaToken3BackgroundColor": {},
"formulaToken3Color": {},
"formulaToken3Border": {},
"formulaToken4BackgroundColor": {},
"formulaToken4Color": {},
"formulaToken4Border": {},
"formulaToken5BackgroundColor": {},
"formulaToken5Color": {},
"formulaToken5Border": {},
"formulaToken6BackgroundColor": {},
"formulaToken6Color": {},
"formulaToken6Border": {},
"formulaToken7BackgroundColor": {},
"formulaToken7Color": {},
"formulaToken1BackgroundColor": {},
"formulaToken2BackgroundColor": {},
"formulaToken3BackgroundColor": {},
"formulaToken4BackgroundColor": {},
"formulaToken5BackgroundColor": {},
"formulaToken6BackgroundColor": {},
"formulaToken7BackgroundColor": {},
"formulaToken1Border": {},
"formulaToken2Border": {},
"formulaToken3Border": {},
"formulaToken4Border": {},
"formulaToken5Border": {},
"formulaToken6Border": {},
"formulaToken7Border": {}
},
"find": {
Expand Down
7 changes: 4 additions & 3 deletions packages/ag-grid-community/src/edit/editModelService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,10 @@ export class EditModelService extends BeanStub implements NamedBean {
const data: any = { ...rowNode.data };

const applyEdits = (edits: EditRow, data: any) =>
edits.forEach(({ pendingValue }, column) => {
if (pendingValue !== UNEDITED) {
data[column.getColId()] = pendingValue;
edits.forEach(({ editorValue, pendingValue }, column) => {
const value = editorValue === undefined ? pendingValue : editorValue;
if (value !== UNEDITED) {
data[column.getColId()] = value;
}
});

Expand Down
5 changes: 4 additions & 1 deletion packages/ag-grid-community/src/edit/editService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ const COMMIT_PARAMS: StopEditParams = { cancel: false, source: 'api' };
const CHECK_SIBLING = { checkSiblings: true };

const FORCE_REFRESH = { force: true, suppressFlash: true };
const FORCE_REFRESH_FLASH = { force: true };

export class EditService extends BeanStub implements NamedBean {
public beanName = 'editSvc' as const;
Expand Down Expand Up @@ -1299,7 +1300,9 @@ export class EditService extends BeanStub implements NamedBean {
_purgeUnchangedEdits(beans);

// Re-fetch: change detection during setDataValue may have recreated the CellCtrl.
_getCellCtrl(beans, position)?.refreshCell(FORCE_REFRESH);
// Only allow flash when the value was actually committed; suppress when setDataValue
// returned false (e.g. readOnlyEdit, rejected valueSetter, unchanged value).
_getCellCtrl(beans, position)?.refreshCell(success ? FORCE_REFRESH_FLASH : FORCE_REFRESH);
return success;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,12 +222,14 @@ export class SingleCellEditStrategy extends BaseEditStrategy {
// Don't start editing the next cell, focus only
const suppressStartEditOnTab = this.gos.get('suppressStartEditOnTab');

let startEditingCalled = false;
if (!rowsMatch && !preventNavigation) {
super.cleanupEditors(nextCell, true);

if (suppressStartEditOnTab) {
nextCell.focusCell(true, event);
} else {
startEditingCalled = true;
this.editSvc.startEditing(nextCell, {
startedEdit: true,
event,
Expand All @@ -244,13 +246,17 @@ export class SingleCellEditStrategy extends BaseEditStrategy {
if (suppressStartEditOnTab) {
nextCell.focusCell(true, event);
} else if (!nextCell.comp?.getCellEditor()) {
// Two possibilities:
// * Editor should be visible (but was destroyed due to column virtualisation)
// = we shouldn't re-emit a startEdit event, so stay silent
// * Editor wasn't created because edit came from API and didn't trigger EditService.startEditing
// = shouldn't be silent
const alreadyEditing = this.editSvc?.isEditing(nextCell, { withOpenEditor: true });
_setupEditor(this.beans, nextCell, { event, cellStartedEdit: true, silent: alreadyEditing });
// If startEditing was called above (cross-row navigation), the editor may not
// exist yet because React creates editor components asynchronously. In that case
// skip the redundant _setupEditor call to avoid overwriting the correctly-
// parameterised first call. Otherwise, the editor is genuinely missing (e.g.
// destroyed by column virtualisation while edit state remained open) and must
// be re-created — silently if the cell is already in editing state to avoid
// re-emitting cellEditingStarted.
if (!startEditingCalled) {
const alreadyEditing = this.editSvc?.isEditing(nextCell, { withOpenEditor: true });
_setupEditor(this.beans, nextCell, { event, cellStartedEdit: true, silent: alreadyEditing });
}
this.setFocusInOnEditor(nextCell);

this.cleanupEditors(nextCell);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@
flex: 1 1 auto;
}

:where(.ag-column-panel.ag-column-panel-deferred),
:where(.ag-column-panel.ag-column-panel-deferred) :where(.ag-column-panel-column-select),
:where(.ag-column-panel.ag-column-panel-deferred) :where(.ag-column-drop-vertical),
:where(.ag-column-panel.ag-column-panel-deferred) :where(.ag-column-panel-defer-mode-toggle),
:where(.ag-column-panel.ag-column-panel-deferred) :where(.ag-column-panel-buttons) {
background-color: var(--ag-cell-batch-edit-background-color);
}

.ag-pivot-mode-panel {
height: var(--ag-header-height);
display: flex;
Expand Down
Loading
Loading