Skip to content

Updates for React 16#177

Merged
tcbegley merged 7 commits intomasterfrom
dash-v1
Apr 19, 2019
Merged

Updates for React 16#177
tcbegley merged 7 commits intomasterfrom
dash-v1

Conversation

@tcbegley
Copy link
Copy Markdown
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

Comment thread docs/components_page/components/modal/__init__.py Outdated
Comment thread docs/components_page/components/modal/__init__.py Outdated
Comment thread docs/components_page/components/modal/scrollable.py Outdated
Comment thread docs/components_page/components/modal/__init__.py Outdated
@pbugnion
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants