-
Notifications
You must be signed in to change notification settings - Fork 223
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
Updates for Dash v1 #142
Comments
just curious, do you find any post / issue talking about the roadmap of Dash and when v1 will be ready? |
This issue on the Dash repo is tracking progress on v1. |
With the release of Dash v0.41.0, dash-renderer is now using React 16, so we are no longer blocked from implementing the items in this issue. |
cool, look forward to it. |
There's now nothing blocking these updates, going to open individual issues for the remaining items. |
@tcbegley #136 is also closed, just want to highlight the visibility. Also, regarding the toggle, is it possible to add below as well
|
Hey @happyshows The toggle switches are being tracked under #184 now, it will be part of a bigger effort to support custom inputs. As far as I can tell, the app.layout = dbc.Button("Toggle", id="toggle")
@app.callback(Output("toggle", "active"), [Input("toggle", "n_clicks")])
def set_toggle(n):
if n:
# set active if button has been pressed odd number of times
return n % 2 == 0
return False or for the button group app.layout = dbc.ButtonGroup(
[
dbc.Button(label.capitalize(), id=label)
for label in ["left", "middle", "right"]
]
)
@app.callback(
[Output(label, "active") for label in ["left", "middle", "right"]],
[Input(label, "n_clicks") for label in ["left", "middle", "right"]],
)
def set_group_toggle(*args):
ctx = dash.callback_context
if not ctx.triggered or all(arg is None for arg in args):
return [False, False, False]
button_id = ctx.triggered[0]["prop_id"].split(".")[0]
return [button_id == label for label in ["left", "middle", "right"]] |
This issue is for tracking changes that either need to be made, or can't be made before the release of Dash v1. Most of the changes are the result of Dash v1 (or specifically dash-renderer) supporting React 16, while the current release of Dash does not.
Dropdown
which we use inDropdownMenu
) has switched to usingcreatePortal
which is React 16 only.createPortal
for this). Resolved by Add modals #146DropdownMenu
. See Re-enable direction=up on dropdowns #65DropdownMenu
. Resolved by Add option to right align the dropdown menu #143, thanks @jmsblah!There are pre-releases out for the v1 series of Dash libraries, so we can already build much of this and test against those then release when they are released. I have a
dash-v1
branch open, I propose any of the above changes are PR'd against and merged into that branch.The text was updated successfully, but these errors were encountered: