Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Slider tooltip not updating in certain scenarios #763

Closed
chriddyp opened this issue Feb 27, 2020 · 5 comments · Fixed by #963
Closed

Slider tooltip not updating in certain scenarios #763

chriddyp opened this issue Feb 27, 2020 · 5 comments · Fixed by #963
Labels

Comments

@chriddyp
Copy link
Member

as reported in https://community.plot.ly/t/tooltip-and-slider-not-refreshing-the-position/35556

@chriddyp chriddyp added the bug label Feb 27, 2020
@xhluca
Copy link

xhluca commented Mar 6, 2020

I created the following minimally-reproduceable example:

import dash
import dash_html_components as html
import dash_core_components as dcc

external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css']

app = dash.Dash(__name__, external_stylesheets=external_stylesheets)
app.layout = html.Div(style={'margin': '20px'}, children=[
    dcc.Slider(
        id='my-slider',
        min=0,
        max=20,
        step=0.5,
        value=10,
        tooltip=dict(always_visible=True)
    ),
    html.Div(id='slider-output-container')
])


@app.callback(
    dash.dependencies.Output('slider-output-container', 'children'),
    [dash.dependencies.Input('my-slider', 'value')])
def update_output(value):
    return 'You have selected "{}"'.format(value)


if __name__ == '__main__':
    app.run_server(debug=True)

Here's an example of what it looks like:
dcc-slider-bug

@jjaraalm
Copy link

Same issue here, comes from upstream.

Appears fixed in the antd package but not backported to rc-slider. See: react-component/slider#623

Simple fix might be to change dependencies from rc-slider (and other rc- components) to antd.

@emmanuelle
Copy link
Contributor

@almarklein
Copy link
Contributor

I ran into this too, yesterday. But after updating dash-core-components, it worked as expected. I just verified that with the example code above, the tooltip moves along correctly. So I suspect that this issue can be closed.

@kdburke
Copy link

kdburke commented Dec 22, 2020

I had a similar issue with tooltips rendering in the wrong part of the page as the app loaded. Updating my dash packages including dash-core-components resolved this issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants