Skip to content

Commit 747996f

Browse files
Issue 365 - Fix tooltip position & display with fixed columns/rows (#366)
1 parent b862a5d commit 747996f

File tree

10 files changed

+3879
-92844
lines changed

10 files changed

+3879
-92844
lines changed

packages/dash-table/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
1010
- Added support for single and double quoted column id with arbitrary name
1111

1212
### Fixed
13+
[#365](https://github.com/plotly/dash-table/issues/365)
14+
- Incorrect tooltip behavior if cell is in a fixed row or column
15+
1316
- Incorrect default value for `column_static_tooltip` changed from [] to {}
1417

1518
## [3.3.0] - 2019-02-01

packages/dash-table/dash_table/bundle.js

Lines changed: 7 additions & 44178 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/dash-table/dash_table/bundle.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/dash-table/dash_table/demo.js

Lines changed: 7 additions & 44865 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/dash-table/dash_table/demo.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/dash-table/dash_table/package-info.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@
5151
"@percy-io/percy-storybook": "^2.1.0",
5252
"@storybook/cli": "^4.1.11",
5353
"@storybook/react": "^4.1.11",
54-
"@types/ramda": "^0.25.47",
55-
"@types/react": "^16.7.22",
56-
"@types/react-dom": "^16.0.11",
54+
"@types/ramda": "^0.25.48",
55+
"@types/react": "^16.8.2",
56+
"@types/react-dom": "^16.8.0",
5757
"@types/react-select": "^1.3.4",
5858
"babel-loader": "^8.0.5",
5959
"core-js": "^2.6.3",
@@ -67,9 +67,9 @@
6767
"npm": "^6.7.0",
6868
"npm-run-all": "^4.1.5",
6969
"ramda": "^0.26.1",
70-
"react": "16.7.0",
70+
"react": "16.8.1",
7171
"react-docgen": "^3.0.0",
72-
"react-dom": "16.7.0",
72+
"react-dom": "16.8.1",
7373
"react-select": "^1.3.0",
7474
"remarkable": "^1.7.1",
7575
"sheetclip": "^0.3.0",
@@ -78,8 +78,8 @@
7878
"tslint": "^5.12.1",
7979
"typescript": "^3.3.1",
8080
"wait-on": "^3.2.0",
81-
"webpack": "^4.29.0",
82-
"webpack-cli": "^3.2.1",
81+
"webpack": "^4.29.2",
82+
"webpack-cli": "^3.2.3",
8383
"webpack-dev-server": "^3.1.14",
8484
"webpack-preprocessor": "^0.1.12"
8585
},

packages/dash-table/demo/AppMode.ts

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { TooltipSyntax } from 'dash-table/tooltips/props';
1414

1515
export enum AppMode {
1616
Default = 'default',
17+
FixedTooltips = 'fixed,tooltips',
1718
FixedVirtualized = 'fixed,virtualized',
1819
ReadOnly = 'readonly',
1920
ColumnsInSpace = 'columnsInSpace',
@@ -108,9 +109,20 @@ function getSpaceInColumn() {
108109
return state;
109110
}
110111

112+
function getFixedTooltipsState() {
113+
const state = getTooltipsState();
114+
115+
state.tableProps.n_fixed_columns = 3;
116+
state.tableProps.n_fixed_rows = 4;
117+
118+
return state;
119+
}
120+
111121
function getTooltipsState() {
112122
const state = getDefaultState();
113123

124+
state.tableProps.tooltip_delay = 250;
125+
state.tableProps.tooltip_duration = 1000;
114126
state.tableProps.tooltips = {
115127
ccc: [
116128
{ type: TooltipSyntax.Markdown, value: `### Go Proverb\nThe enemy's key point is yours` },
@@ -122,7 +134,7 @@ function getTooltipsState() {
122134
]
123135
};
124136
state.tableProps.column_static_tooltip = {
125-
ccc: { type: TooltipSyntax.Text, value: `There is death in the hane`, delay: 1000, duration: 5000 },
137+
ccc: { type: TooltipSyntax.Text, value: `There is death in the hane` },
126138
ddd: { type: TooltipSyntax.Markdown, value: `Hane, Cut, Placement` },
127139
rows: `Learn the eyestealing tesuji`
128140
};
@@ -144,8 +156,6 @@ function getTooltipsState() {
144156
if: {
145157
column_id: 'bbb-readonly'
146158
},
147-
delay: 1000,
148-
duration: 5000,
149159
type: TooltipSyntax.Markdown,
150160
value: `### Go Proverbs\nUrgent points before big points\n![Sensei](https://senseis.xmp.net/images/stone-hello.png)`
151161
}];
@@ -208,6 +218,8 @@ function getState() {
208218
const mode = Environment.searchParams.get('mode');
209219

210220
switch (mode) {
221+
case AppMode.FixedTooltips:
222+
return getFixedTooltipsState();
211223
case AppMode.FixedVirtualized:
212224
return getFixedVirtualizedState();
213225
case AppMode.ReadOnly:

0 commit comments

Comments
 (0)