Skip to content

Commit 6b8228a

Browse files
authored
Merge pull request plotly#2277 from plotly/update-dropdown-styles
Use dropdown styles from node_modules, instead of from stored css file
2 parents 0879395 + 787b974 commit 6b8228a

File tree

4 files changed

+46
-23
lines changed

4 files changed

+46
-23
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
2727
- [#2265](https://github.com/plotly/dash/pull/2265) Removed deprecated `before_first_request` as reported in [#2177](https://github.com/plotly/dash/issues/2177).
2828
- [#2257](https://github.com/plotly/dash/pull/2257) Fix tuple types in the TypeScript component generator.
2929
- [#2293](https://github.com/plotly/dash/pull/2293) Fix Dropdown useMemo not detecting equal objects
30+
- [#2277](https://github.com/plotly/dash/pull/2277) Use dropdown styles from node_modules, instead of from stored css file
3031

3132
### Changed
3233

components/dash-core-components/src/components/css/[email protected]

Lines changed: 0 additions & 22 deletions
This file was deleted.

components/dash-core-components/src/fragments/Dropdown.react.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {isNil, pluck, without, pick} from 'ramda';
22
import React, {useState, useCallback, useEffect, useMemo, useRef} from 'react';
33
import ReactDropdown from 'react-virtualized-select';
44
import createFilterOptions from 'react-select-fast-filter-options';
5-
import '../components/css/react-virtualized-select@3.1.0.css';
5+
import 'react-virtualized-select/styles.css';
66
import '../components/css/[email protected]';
77
import '../components/css/Dropdown.css';
88

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
from dash import Dash
2+
from dash.dcc import Dropdown
3+
from dash.html import Div
4+
from dash.dash_table import DataTable
5+
6+
7+
def test_ddst001_cursor_should_be_pointer(dash_duo):
8+
app = Dash(__name__)
9+
app.layout = Div(
10+
[
11+
Dropdown(
12+
id="dropdown",
13+
options=[
14+
{"label": "New York City", "value": "NYC"},
15+
{"label": "Montreal", "value": "MTL"},
16+
{"label": "San Francisco", "value": "SF"},
17+
],
18+
value="NYC",
19+
),
20+
DataTable(
21+
id="table",
22+
columns=[
23+
{"name": x, "id": x, "selectable": True} for x in ["a", "b", "c"]
24+
],
25+
editable=True,
26+
row_deletable=True,
27+
fixed_rows=dict(headers=True),
28+
fixed_columns=dict(headers=True),
29+
data=[
30+
{"a": "a" + str(x), "b": "b" + str(x), "c": "c" + str(x)}
31+
for x in range(0, 20)
32+
],
33+
),
34+
]
35+
)
36+
37+
dash_duo.start_server(app)
38+
39+
dash_duo.find_element("#dropdown").click()
40+
dash_duo.wait_for_element("#dropdown .Select-menu-outer")
41+
42+
items = dash_duo.find_elements("#dropdown .Select-menu-outer .VirtualizedSelectOption")
43+
44+
assert items[0].value_of_css_property('cursor') == "pointer"

0 commit comments

Comments
 (0)