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

Updates for React 16 #177

Merged
merged 7 commits into from
Apr 19, 2019
Merged

Updates for React 16 #177

merged 7 commits into from
Apr 19, 2019

Conversation

tcbegley
Copy link
Collaborator

@tcbegley tcbegley commented Apr 11, 2019

With the release of dash 0.41.0 and dash-renderer 0.22.0, dash-renderer is now using React 16, meaning the work that was happening on the dash-v1 branch can be merged.

Changes include:

I made a prerelease for testing:

pip install dash-bootstrap-components==0.5.0rc1

@pbugnion
Copy link
Contributor

pbugnion commented Apr 17, 2019

On modals, I expect people will spend a ton of time writing annoying little callbacks like:

@app.callback(
    Output("modal", "is_open"),
    [Input("open", "n_clicks"), Input("close", "n_clicks")],
    [State("modal", "is_open")],
)
def toggle_modal(n1, n2, is_open):
    if n1 or n2:
        return not is_open
    return is_open

Could we potentially provide a function like:

dbc.interaction.bind_modal_callbacks(app, 'modal')

?

(we could imagine similar callbacks in the dbc.interaction module for other cases where the interaction is obvious, like popovers, fade and collapse).

I don't think that's in scope for this PR, but it might be worth considering.

@pbugnion
Copy link
Contributor

pbugnion commented Apr 17, 2019

This looks great! Modulo a couple of comments inline, merge whenever!

I think modals and spinners will be a great addition.

@tcbegley
Copy link
Collaborator Author

Thanks for reviewing!

I think your dbc.interaction module idea is nice, definitely worth experimenting with that.

@tcbegley tcbegley merged commit 4e1ee78 into master Apr 19, 2019
@tcbegley tcbegley deleted the dash-v1 branch April 19, 2019 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants