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

Turn off undo/redo by default in Dash 1.0 #234

Closed
Moisan opened this issue Mar 27, 2018 · 12 comments · Fixed by #724
Closed

Turn off undo/redo by default in Dash 1.0 #234

Moisan opened this issue Mar 27, 2018 · 12 comments · Fixed by #724
Assignees

Comments

@Moisan
Copy link

Moisan commented Mar 27, 2018

The current solution to remove the undo-redo button is to change the css of the page to hide it while using a hosted css file.

It would be much simpler to have an option that toggles this button, a bit like the graph toolbar.

@charleyferrari
Copy link

@Moisan Thanks for writing in. This seems like a good feature to have within Dash. Adding some tags to encourage some discussion and collaboration.

@ebber
Copy link

ebber commented May 16, 2018

Would very much appreciate this feature as well. I am having trouble using the workaround. While I will be able to do it, it seems like a useful feature to be able to config, rather than making messy code.

@radekwlsk
Copy link

Is conditionally removing <Toolbar/> from

function UnconnectedAppContainer() {
    return (
        <Authentication>
            <div>
                <Toolbar/>
                <APIController/>
                <DocumentTitle/>
                <Loading/>
            </div>
        </Authentication>
    );
}

in dash-renderer/src/AppContainer.react.js enough to get rid of it without breaking other things?

@Myijin
Copy link

Myijin commented Oct 17, 2018

The undo button does not change anything for my dash app, which has input box and button.
My function looks like this:

@app.callback(Output('Docs', 'children'),
              [Input('button', 'n_clicks')],
              [State('input', 'value')])
def clean_data(n_clicks, input):
     if n_clicks is not None and input is not None:
            return ...

For example, I enter “A” in the input box and click the button, then enter “B” in the input box and click the button. Then clicking undo nothing is changed. I am hoping that the undo can go back to the result for “A”.

@rmarren1
Copy link
Contributor

@Myijin I think this issue describes the behavior you are talking about plotly/dash-renderer#66, does that sound right?

@Myijin
Copy link

Myijin commented Oct 19, 2018

@rmarren1 That's right. When I only use the input box, the undo can go back to previous input. But it's not working after using button.

@rmarren1
Copy link
Contributor

@Myijin Okay, I have a PR to fix this that is ready but have not merged, I'll see if I can expedite that

@vanbenschoten
Copy link

Is there any update on an easy option to remove the Undo-Redo button? I'll add my support for an easy toggle option as the button currently gets in the way of our dashboards.

@T4rk1n
Copy link
Contributor

T4rk1n commented Oct 19, 2018

Include a css file in the assets folder with this:

._dash-undo-redo {
  display: none;
}

@vanbenschoten
Copy link

@T4rk1n thanks! That took care of the issue (though I still think a toggle feature would be helpful as well)

@eddy-ojb
Copy link

I would like the undo-button but have no control over where it is displayed. For example, I don't want its position fixed but would like it as part of my menu bar as a relative element. A better feature would be to be able to supply positional css straight to the element, including display: none.

@Akronix
Copy link
Contributor

Akronix commented Nov 14, 2018

I would like the undo-button but have no control over where it is displayed. For example, I don't want its position fixed but would like it as part of my menu bar as a relative element. A better feature would be to be able to supply positional css straight to the element, including display: none.

hmm What's wrong with using the ._dash-undo-redo css class and add your desired custom style into your css stylesheet?

@shammamah-zz shammamah-zz self-assigned this Nov 29, 2018
@bpostlethwaite bpostlethwaite changed the title Add an option to remove the undo-redo button. Turn off undo/redo by default in Dash 1.0 Nov 30, 2018
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 a pull request may close this issue.