From b95c093a09af4c6c86b53e93da9b86e2ed016e94 Mon Sep 17 00:00:00 2001 From: Ivanna Ostrovets Date: Fri, 12 Mar 2021 18:53:23 +0200 Subject: [PATCH 1/3] Fix typo in EnhancedTab disabled_className property --- src/components/Tabs.react.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Tabs.react.js b/src/components/Tabs.react.js index 3c78189de..beb778a8c 100644 --- a/src/components/Tabs.react.js +++ b/src/components/Tabs.react.js @@ -218,7 +218,7 @@ export default class Tabs extends Component { value={childProps.value} disabled={childProps.disabled} disabled_style={childProps.disabled_style} - disabled_classname={childProps.disabled_className} + disabled_className={childProps.disabled_className} mobile_breakpoint={this.props.mobile_breakpoint} vertical={this.props.vertical} amountOfTabs={amountOfTabs} From 2f449f1322ebfbf5dc97bf35fb3869eb1e63fa68 Mon Sep 17 00:00:00 2001 From: Ivanna Ostrovets Date: Sun, 14 Mar 2021 17:23:30 +0200 Subject: [PATCH 2/3] Add changelog entry for EnhancedTab fix --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 58baaefd4..f83be206c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Fixed - [#930](https://github.com/plotly/dash-core-components/pull/930) Fixed a bug [#867](https://github.com/plotly/dash-core-components/issues/867) with `DatePickerRange` that would sometimes shift the allowed dates by one day. +- [#934](https://github.com/plotly/dash-core-components/pull/934) Fixed a bug in `EnhancedTab` component that ignored `disabled_className` property ## [1.15.0] - 2021-01-19 ### Fixed From 41e44e18450c4a1a3d16e412df5f9d2fde398269 Mon Sep 17 00:00:00 2001 From: Ivanna Ostrovets Date: Mon, 15 Mar 2021 14:57:44 +0200 Subject: [PATCH 3/3] Add test for checking disabled_className property shows in DOM --- tests/integration/tab/test_tabs_with_graphs.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/integration/tab/test_tabs_with_graphs.py b/tests/integration/tab/test_tabs_with_graphs.py index 780cf0eda..5f5d6ba1c 100644 --- a/tests/integration/tab/test_tabs_with_graphs.py +++ b/tests/integration/tab/test_tabs_with_graphs.py @@ -24,6 +24,13 @@ def test_graph_does_not_resize_in_tabs(dash_dcc, is_eager): children=[ dcc.Tab(label="Tab One", value="tab-1-example", id="tab-1"), dcc.Tab(label="Tab Two", value="tab-2-example", id="tab-2"), + dcc.Tab( + label="Tab Three", + value="tab-3-example", + id="tab-3", + disabled=True, + disabled_className="disabled-tab", + ), ], ), html.Div(id="tabs-content-example"), @@ -64,6 +71,9 @@ def render_content(tab): tab_one = dash_dcc.wait_for_element("#tab-1") tab_two = dash_dcc.wait_for_element("#tab-2") + # wait for disabled tab with custom className + dash_dcc.wait_for_element("#tab-3.disabled-tab") + WebDriverWait(dash_dcc.driver, 10).until( EC.element_to_be_clickable((By.ID, "tab-2")) )