Skip to content

Commit

Permalink
Fix table bug where shift-selecting rows would highlight all cell con…
Browse files Browse the repository at this point in the history
…tent (#1408)

# Pull Request

## 🤨 Rationale

Fix a bug in the `nimble-table` where shift-selecting rows would
incorrectly highlight all cell content within the selection range.

## 👩‍💻 Implementation

Mark `documentShiftKeyDown` as `@observable` on the `Table`. This
appears to have been accidentally removed in #1321.

## 🧪 Testing

Manually tested that shift-selecting rows no longer selects the text in
cells.

## ✅ Checklist

<!--- Review the list and put an x in the boxes that apply or ~~strike
through~~ around items that don't (along with an explanation). -->

- [x] I have updated the project documentation to reflect my changes or
determined no changes are needed.
  • Loading branch information
mollykreis authored Aug 2, 2023
1 parent a284053 commit aa64ac8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "Fix table bug where shift-selecting rows would highlight all cell content",
"packageName": "@ni/nimble-components",
"email": "20542556+mollykreis@users.noreply.github.com",
"dependentChangeType": "patch"
}
1 change: 1 addition & 0 deletions packages/nimble-components/src/table/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ export class Table<
@observable
public tableScrollableMinWidth = 0;

@observable
public documentShiftKeyDown = false;

private readonly table: TanStackTable<TData>;
Expand Down

0 comments on commit aa64ac8

Please sign in to comment.