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

RangeSlider: unable to move handles #105

Closed
mcpcpc opened this issue Nov 2, 2022 · 2 comments
Closed

RangeSlider: unable to move handles #105

mcpcpc opened this issue Nov 2, 2022 · 2 comments

Comments

@mcpcpc
Copy link

mcpcpc commented Nov 2, 2022

Issue Problem Statement

Unable to move range slider handles if minRange prop is not defined. This issue seems like to be intermittent, depending on the value of your min and max props.

image

Steps To Reproduce

Requirements

dash-mantine-components==0.11.0a0

Minimal Working Solution

import dash_mantine_components as dmc
from dash import callback, html, Output, Input, Dash

app = Dash(__name__)
app.layout = html.Div(
    [
        dmc.Text(children="Lorem Ipsum", id="range-slider-output"),
        dmc.RangeSlider(
            id={"type": "form", "index": "coil-type"},
            min=1,
            max=50,
            step=1
        )
    ]
)
    
if __name__ == "__main__":
    app.run_server(debug=True)
@snehilvj
Copy link
Owner

snehilvj commented Nov 6, 2022

Hi @mcpcpc, I think what's happening here is that the default value of minRange prop is 10, so when you set the max to be 6, you need to change the minRange prop as well, for example, you can set it to 3.

In the MWS code you have shared, the max is set to 50, more than the default minRange, so should not see the above issue.

There is another issue with RangeSlider which is observed when you set min prop to a negative value. Its a bug in Mantine itself and can be tracked here: mantinedev/mantine#2897.

@snehilvj
Copy link
Owner

snehilvj commented Nov 12, 2022

Issue has been resolved upstream and dmc master has been updated with the latest version of Mantine: 5.7.2.

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

No branches or pull requests

2 participants