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 7 commits into from Apr 19, 2019

Updates for React 16 #177

merged 7 commits into from Apr 19, 2019


Copy link

@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:

  • New Modal components + documentation (#146)
  • New Spinner component + documentation (#161)
  • Allow right-alignment of DropdownMenu (#139)
  • Update to reactstrap 8

I made a prerelease for testing:

pip install dash-bootstrap-components==0.5.0rc1

Copy link

@pbugnion pbugnion commented Apr 17, 2019

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

    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.

Copy link

@pbugnion 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.

Copy link
Collaborator Author

@tcbegley tcbegley commented Apr 19, 2019

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
2 checks passed
@tcbegley tcbegley deleted the dash-v1 branch Apr 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

None yet

3 participants