Skip to content

Commit

Permalink
fix(grid): read-only mode table click event disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Xwatson committed Nov 28, 2024
1 parent 478c1ba commit f4f1c09
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/grid/src/grid.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ export class AITableGrid extends AITableGridBase implements OnInit, OnDestroy {
mouseEvent.preventDefault();
const { context } = this.aiTable;
const { targetName, rowIndex: pointRowIndex } = context!.pointPosition();
if (mouseEvent.button !== AITableMouseDownType.Left) return;
if (mouseEvent.button !== AITableMouseDownType.Left || (targetName !== AI_TABLE_FIELD_HEAD_MORE && this.aiReadonly())) return;
switch (targetName) {
case AI_TABLE_ROW_ADD_BUTTON: {
this.aiTableGridSelectionService.clearSelection();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export class AITableAddField {
const fill = targetName === AI_TABLE_FIELD_ADD_BUTTON ? Colors.gray80 : Colors.white;
return {
name: generateTargetName({
targetName: readonly ? AI_TABLE_FIELD_HEAD : AI_TABLE_FIELD_ADD_BUTTON,
targetName: AI_TABLE_FIELD_ADD_BUTTON,
fieldId: this.config().fields[this.config().columnStopIndex]._id,
mouseStyle: readonly ? 'default' : 'pointer'
}),
Expand Down

0 comments on commit f4f1c09

Please sign in to comment.