Skip to content

Commit

Permalink
fix(table): uses a workaround to address a react-draggable bug
Browse files Browse the repository at this point in the history
When react-draggable's Draggable component unmounts, it causes text inputs to lose focus. These changes add a workaround for this problem: react-grid-layout/react-draggable#315
  • Loading branch information
mperrotti committed Oct 28, 2019
1 parent 52511d4 commit 12d3e8e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 16 deletions.
18 changes: 3 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -52,7 +52,7 @@
"react-chartist": "^0.13.3",
"react-click-outside": "3.0.1",
"react-delegate-component": "1.0.0",
"react-draggable": "3.2.1",
"react-draggable": "3.3.2",
"react-emotion": "9.2.12",
"react-focus-lock": "2.0.5",
"react-tabs": "^3.0.0",
Expand Down
3 changes: 3 additions & 0 deletions packages/table/components/Table.tsx
Expand Up @@ -469,6 +469,9 @@ export class Table<T> extends React.PureComponent<TableProps, TableState> {
this.getContainerWidth() * (1 - COL_RESIZE_MAX_WIDTH),
bottom: 0
}}
// Needed for an issue where text inputs lose focus when a Draggable unmounts
// Github issue: https://github.com/mzabriskie/react-draggable/issues/315
enableUserSelectHack={false}
>
<div>
<div
Expand Down

0 comments on commit 12d3e8e

Please sign in to comment.