Skip to content

Commit

Permalink
fix(database): row selection is incorrect when clicking the row optio…
Browse files Browse the repository at this point in the history
…ns button (#8817)
  • Loading branch information
zzj3720 authored Nov 27, 2024
1 parent 9c8df5a commit deab61d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ export const popRowMenu = (
],
}),
menu.group({
name: '',
items: [
menu.action({
name: 'Delete Row',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,13 @@ export class TableRow extends SignalWatcher(WithDisposable(ShadowlessElement)) {
return;
}
const ele = e.currentTarget as HTMLElement;
if (!TableRowSelection.is(this.selectionController.selection)) {
const selection = this.selectionController.selection;
if (
!TableRowSelection.is(selection) ||
!selection.rows.some(
row => row.id === this.rowId && row.groupKey === this.groupKey
)
) {
const row = { id: this.rowId, groupKey: this.groupKey };
this.setSelection(
TableRowSelection.create({
Expand Down

0 comments on commit deab61d

Please sign in to comment.