Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use dropdown styles from node_modules, instead of from stored css file #2277

Merged
merged 5 commits into from
Nov 2, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {isNil, pluck, without, pick} from 'ramda';
import React, {useState, useCallback, useEffect, useMemo} from 'react';
import ReactDropdown from 'react-virtualized-select';
import createFilterOptions from 'react-select-fast-filter-options';
import '../components/css/react-virtualized-select@3.1.0.css';
import '../../../dash-core-components/node_modules/react-virtualized-select/styles.css';
T4rk1n marked this conversation as resolved.
Show resolved Hide resolved
import '../components/css/react-virtualized@9.9.0.css';
import '../components/css/Dropdown.css';

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
from dash import Dash
from dash.dcc import Dropdown
from dash.html import Div
from dash.dash_table import DataTable


def test_ddst001_cursor_should_be_pointer(dash_duo):
app = Dash(__name__)
app.layout = Div(
[
Dropdown(
id="dropdown",
options=[
{"label": "New York City", "value": "NYC"},
{"label": "Montreal", "value": "MTL"},
{"label": "San Francisco", "value": "SF"},
],
value="NYC",
),
DataTable(
id="table",
columns=[
{"name": x, "id": x, "selectable": True} for x in ["a", "b", "c"]
],
editable=True,
row_deletable=True,
fixed_rows=dict(headers=True),
fixed_columns=dict(headers=True),
data=[
{"a": "a" + str(x), "b": "b" + str(x), "c": "c" + str(x)}
for x in range(0, 20)
],
),
]
)

dash_duo.start_server(app)

dash_duo.find_element("#dropdown").click()
dash_duo.wait_for_element("#dropdown .Select-menu-outer")

items = dash_duo.find_elements("#dropdown .Select-menu-outer .VirtualizedSelectOption")

assert items[0].value_of_css_property('cursor') == "pointer"