Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Commit 26b2c62

Browse files
Merge pull request #267 from plotly/265-tabs-without-children
Tabs and Tab component bug-fixes
2 parents 895d3e3 + e2b8f7e commit 26b2c62

28 files changed

+1978
-1949
lines changed

Diff for: .eslintrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
extends: ./node_modules/dash-components-archetype/config/eslint/eslintrc-react.json
2+
extends: ./node_modules/dash-components-archetype/config/eslint/eslintrc-react.json

Diff for: CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5+
## [0.27.2]
6+
### Fixed
7+
- `Tabs.children` can now be undefined, so you can update them dynamically. [#265](https://github.com/plotly/dash-core-components/issues/265)
8+
- `Tabs` Callback-less version no longer has the 2nd tab selected by default [#262](https://github.com/plotly/dash-core-components/issues/262)
9+
- Fixes bug with nested `Tabs` [#273](https://github.com/plotly/dash-core-components/issues/273) and [#272](https://github.com/plotly/dash-core-components/issues/272)
10+
511
## [0.27.1]
612
### Fixed
713
- `ConfirmDialogProvider` can now be used without a callback. [#241](https://github.com/plotly/dash-core-components/pull/241)

Diff for: dash_core_components/Checklist.py

+69-69
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,69 @@
1-
# AUTO GENERATED FILE - DO NOT EDIT
2-
3-
from dash.development.base_component import Component, _explicitize_args
4-
5-
6-
class Checklist(Component):
7-
"""A Checklist component.
8-
Checklist is a component that encapsulates several checkboxes.
9-
The values and labels of the checklist is specified in the `options`
10-
property and the checked items are specified with the `values` property.
11-
Each checkbox is rendered as an input with a surrounding label.
12-
13-
Keyword arguments:
14-
- id (string; optional)
15-
- options (list; optional): An array of options
16-
- values (list; optional): The currently selected value
17-
- className (string; optional): The class of the container (div)
18-
- style (dict; optional): The style of the container (div)
19-
- inputStyle (dict; optional): The style of the <input> checkbox element
20-
- inputClassName (string; optional): The class of the <input> checkbox element
21-
- labelStyle (dict; optional): The style of the <label> that wraps the checkbox input
22-
and the option's label
23-
- labelClassName (string; optional): The class of the <label> that wraps the checkbox input
24-
and the option's label
25-
26-
Available events: 'change'"""
27-
@_explicitize_args
28-
def __init__(self, id=Component.UNDEFINED, options=Component.UNDEFINED, values=Component.UNDEFINED, className=Component.UNDEFINED, style=Component.UNDEFINED, inputStyle=Component.UNDEFINED, inputClassName=Component.UNDEFINED, labelStyle=Component.UNDEFINED, labelClassName=Component.UNDEFINED, **kwargs):
29-
self._prop_names = ['id', 'options', 'values', 'className', 'style', 'inputStyle', 'inputClassName', 'labelStyle', 'labelClassName']
30-
self._type = 'Checklist'
31-
self._namespace = 'dash_core_components'
32-
self._valid_wildcard_attributes = []
33-
self.available_events = ['change']
34-
self.available_properties = ['id', 'options', 'values', 'className', 'style', 'inputStyle', 'inputClassName', 'labelStyle', 'labelClassName']
35-
self.available_wildcard_properties = []
36-
37-
_explicit_args = kwargs.pop('_explicit_args')
38-
_locals = locals()
39-
_locals.update(kwargs) # For wildcard attrs
40-
args = {k: _locals[k] for k in _explicit_args if k != 'children'}
41-
42-
for k in []:
43-
if k not in args:
44-
raise TypeError(
45-
'Required argument `' + k + '` was not specified.')
46-
super(Checklist, self).__init__(**args)
47-
48-
def __repr__(self):
49-
if(any(getattr(self, c, None) is not None
50-
for c in self._prop_names
51-
if c is not self._prop_names[0])
52-
or any(getattr(self, c, None) is not None
53-
for c in self.__dict__.keys()
54-
if any(c.startswith(wc_attr)
55-
for wc_attr in self._valid_wildcard_attributes))):
56-
props_string = ', '.join([c+'='+repr(getattr(self, c, None))
57-
for c in self._prop_names
58-
if getattr(self, c, None) is not None])
59-
wilds_string = ', '.join([c+'='+repr(getattr(self, c, None))
60-
for c in self.__dict__.keys()
61-
if any([c.startswith(wc_attr)
62-
for wc_attr in
63-
self._valid_wildcard_attributes])])
64-
return ('Checklist(' + props_string +
65-
(', ' + wilds_string if wilds_string != '' else '') + ')')
66-
else:
67-
return (
68-
'Checklist(' +
69-
repr(getattr(self, self._prop_names[0], None)) + ')')
1+
# AUTO GENERATED FILE - DO NOT EDIT
2+
3+
from dash.development.base_component import Component, _explicitize_args
4+
5+
6+
class Checklist(Component):
7+
"""A Checklist component.
8+
Checklist is a component that encapsulates several checkboxes.
9+
The values and labels of the checklist is specified in the `options`
10+
property and the checked items are specified with the `values` property.
11+
Each checkbox is rendered as an input with a surrounding label.
12+
13+
Keyword arguments:
14+
- id (string; optional)
15+
- options (list; optional): An array of options
16+
- values (list; optional): The currently selected value
17+
- className (string; optional): The class of the container (div)
18+
- style (dict; optional): The style of the container (div)
19+
- inputStyle (dict; optional): The style of the <input> checkbox element
20+
- inputClassName (string; optional): The class of the <input> checkbox element
21+
- labelStyle (dict; optional): The style of the <label> that wraps the checkbox input
22+
and the option's label
23+
- labelClassName (string; optional): The class of the <label> that wraps the checkbox input
24+
and the option's label
25+
26+
Available events: 'change'"""
27+
@_explicitize_args
28+
def __init__(self, id=Component.UNDEFINED, options=Component.UNDEFINED, values=Component.UNDEFINED, className=Component.UNDEFINED, style=Component.UNDEFINED, inputStyle=Component.UNDEFINED, inputClassName=Component.UNDEFINED, labelStyle=Component.UNDEFINED, labelClassName=Component.UNDEFINED, **kwargs):
29+
self._prop_names = ['id', 'options', 'values', 'className', 'style', 'inputStyle', 'inputClassName', 'labelStyle', 'labelClassName']
30+
self._type = 'Checklist'
31+
self._namespace = 'dash_core_components'
32+
self._valid_wildcard_attributes = []
33+
self.available_events = ['change']
34+
self.available_properties = ['id', 'options', 'values', 'className', 'style', 'inputStyle', 'inputClassName', 'labelStyle', 'labelClassName']
35+
self.available_wildcard_properties = []
36+
37+
_explicit_args = kwargs.pop('_explicit_args')
38+
_locals = locals()
39+
_locals.update(kwargs) # For wildcard attrs
40+
args = {k: _locals[k] for k in _explicit_args if k != 'children'}
41+
42+
for k in []:
43+
if k not in args:
44+
raise TypeError(
45+
'Required argument `' + k + '` was not specified.')
46+
super(Checklist, self).__init__(**args)
47+
48+
def __repr__(self):
49+
if(any(getattr(self, c, None) is not None
50+
for c in self._prop_names
51+
if c is not self._prop_names[0])
52+
or any(getattr(self, c, None) is not None
53+
for c in self.__dict__.keys()
54+
if any(c.startswith(wc_attr)
55+
for wc_attr in self._valid_wildcard_attributes))):
56+
props_string = ', '.join([c+'='+repr(getattr(self, c, None))
57+
for c in self._prop_names
58+
if getattr(self, c, None) is not None])
59+
wilds_string = ', '.join([c+'='+repr(getattr(self, c, None))
60+
for c in self.__dict__.keys()
61+
if any([c.startswith(wc_attr)
62+
for wc_attr in
63+
self._valid_wildcard_attributes])])
64+
return ('Checklist(' + props_string +
65+
(', ' + wilds_string if wilds_string != '' else '') + ')')
66+
else:
67+
return (
68+
'Checklist(' +
69+
repr(getattr(self, self._prop_names[0], None)) + ')')

Diff for: dash_core_components/ConfirmDialog.py

+66-66
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,66 @@
1-
# AUTO GENERATED FILE - DO NOT EDIT
2-
3-
from dash.development.base_component import Component, _explicitize_args
4-
5-
6-
class ConfirmDialog(Component):
7-
"""A ConfirmDialog component.
8-
ConfirmDialog is used to display the browser's native "confirm" modal,
9-
with an optional message and two buttons ("OK" and "Cancel").
10-
This ConfirmDialog can be used in conjunction with buttons when the user
11-
is performing an action that should require an extra step of verification.
12-
13-
Keyword arguments:
14-
- id (string; optional)
15-
- message (string; optional): Message to show in the popup.
16-
- submit_n_clicks (number; optional): Number of times the submit button was clicked
17-
- submit_n_clicks_timestamp (number; optional): Last time the submit button was clicked.
18-
- cancel_n_clicks (number; optional): Number of times the popup was canceled.
19-
- cancel_n_clicks_timestamp (number; optional): Last time the cancel button was clicked.
20-
- displayed (boolean; optional): Set to true to send the ConfirmDialog.
21-
- key (string; optional)
22-
23-
Available events: """
24-
@_explicitize_args
25-
def __init__(self, id=Component.UNDEFINED, message=Component.UNDEFINED, submit_n_clicks=Component.UNDEFINED, submit_n_clicks_timestamp=Component.UNDEFINED, cancel_n_clicks=Component.UNDEFINED, cancel_n_clicks_timestamp=Component.UNDEFINED, displayed=Component.UNDEFINED, key=Component.UNDEFINED, **kwargs):
26-
self._prop_names = ['id', 'message', 'submit_n_clicks', 'submit_n_clicks_timestamp', 'cancel_n_clicks', 'cancel_n_clicks_timestamp', 'displayed', 'key']
27-
self._type = 'ConfirmDialog'
28-
self._namespace = 'dash_core_components'
29-
self._valid_wildcard_attributes = []
30-
self.available_events = []
31-
self.available_properties = ['id', 'message', 'submit_n_clicks', 'submit_n_clicks_timestamp', 'cancel_n_clicks', 'cancel_n_clicks_timestamp', 'displayed', 'key']
32-
self.available_wildcard_properties = []
33-
34-
_explicit_args = kwargs.pop('_explicit_args')
35-
_locals = locals()
36-
_locals.update(kwargs) # For wildcard attrs
37-
args = {k: _locals[k] for k in _explicit_args if k != 'children'}
38-
39-
for k in []:
40-
if k not in args:
41-
raise TypeError(
42-
'Required argument `' + k + '` was not specified.')
43-
super(ConfirmDialog, self).__init__(**args)
44-
45-
def __repr__(self):
46-
if(any(getattr(self, c, None) is not None
47-
for c in self._prop_names
48-
if c is not self._prop_names[0])
49-
or any(getattr(self, c, None) is not None
50-
for c in self.__dict__.keys()
51-
if any(c.startswith(wc_attr)
52-
for wc_attr in self._valid_wildcard_attributes))):
53-
props_string = ', '.join([c+'='+repr(getattr(self, c, None))
54-
for c in self._prop_names
55-
if getattr(self, c, None) is not None])
56-
wilds_string = ', '.join([c+'='+repr(getattr(self, c, None))
57-
for c in self.__dict__.keys()
58-
if any([c.startswith(wc_attr)
59-
for wc_attr in
60-
self._valid_wildcard_attributes])])
61-
return ('ConfirmDialog(' + props_string +
62-
(', ' + wilds_string if wilds_string != '' else '') + ')')
63-
else:
64-
return (
65-
'ConfirmDialog(' +
66-
repr(getattr(self, self._prop_names[0], None)) + ')')
1+
# AUTO GENERATED FILE - DO NOT EDIT
2+
3+
from dash.development.base_component import Component, _explicitize_args
4+
5+
6+
class ConfirmDialog(Component):
7+
"""A ConfirmDialog component.
8+
ConfirmDialog is used to display the browser's native "confirm" modal,
9+
with an optional message and two buttons ("OK" and "Cancel").
10+
This ConfirmDialog can be used in conjunction with buttons when the user
11+
is performing an action that should require an extra step of verification.
12+
13+
Keyword arguments:
14+
- id (string; optional)
15+
- message (string; optional): Message to show in the popup.
16+
- submit_n_clicks (number; optional): Number of times the submit button was clicked
17+
- submit_n_clicks_timestamp (number; optional): Last time the submit button was clicked.
18+
- cancel_n_clicks (number; optional): Number of times the popup was canceled.
19+
- cancel_n_clicks_timestamp (number; optional): Last time the cancel button was clicked.
20+
- displayed (boolean; optional): Set to true to send the ConfirmDialog.
21+
- key (string; optional)
22+
23+
Available events: """
24+
@_explicitize_args
25+
def __init__(self, id=Component.UNDEFINED, message=Component.UNDEFINED, submit_n_clicks=Component.UNDEFINED, submit_n_clicks_timestamp=Component.UNDEFINED, cancel_n_clicks=Component.UNDEFINED, cancel_n_clicks_timestamp=Component.UNDEFINED, displayed=Component.UNDEFINED, key=Component.UNDEFINED, **kwargs):
26+
self._prop_names = ['id', 'message', 'submit_n_clicks', 'submit_n_clicks_timestamp', 'cancel_n_clicks', 'cancel_n_clicks_timestamp', 'displayed', 'key']
27+
self._type = 'ConfirmDialog'
28+
self._namespace = 'dash_core_components'
29+
self._valid_wildcard_attributes = []
30+
self.available_events = []
31+
self.available_properties = ['id', 'message', 'submit_n_clicks', 'submit_n_clicks_timestamp', 'cancel_n_clicks', 'cancel_n_clicks_timestamp', 'displayed', 'key']
32+
self.available_wildcard_properties = []
33+
34+
_explicit_args = kwargs.pop('_explicit_args')
35+
_locals = locals()
36+
_locals.update(kwargs) # For wildcard attrs
37+
args = {k: _locals[k] for k in _explicit_args if k != 'children'}
38+
39+
for k in []:
40+
if k not in args:
41+
raise TypeError(
42+
'Required argument `' + k + '` was not specified.')
43+
super(ConfirmDialog, self).__init__(**args)
44+
45+
def __repr__(self):
46+
if(any(getattr(self, c, None) is not None
47+
for c in self._prop_names
48+
if c is not self._prop_names[0])
49+
or any(getattr(self, c, None) is not None
50+
for c in self.__dict__.keys()
51+
if any(c.startswith(wc_attr)
52+
for wc_attr in self._valid_wildcard_attributes))):
53+
props_string = ', '.join([c+'='+repr(getattr(self, c, None))
54+
for c in self._prop_names
55+
if getattr(self, c, None) is not None])
56+
wilds_string = ', '.join([c+'='+repr(getattr(self, c, None))
57+
for c in self.__dict__.keys()
58+
if any([c.startswith(wc_attr)
59+
for wc_attr in
60+
self._valid_wildcard_attributes])])
61+
return ('ConfirmDialog(' + props_string +
62+
(', ' + wilds_string if wilds_string != '' else '') + ')')
63+
else:
64+
return (
65+
'ConfirmDialog(' +
66+
repr(getattr(self, self._prop_names[0], None)) + ')')

0 commit comments

Comments
 (0)