You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of - thanks for this awesome library! It's a lot of fun to work with and it really improves the look of the Dash Apps it is used with 😃.
I have a feature request to add support for label formatting on slider elements, e.g., 40 °C for values of 40.
Background
This is supported in Mantine (see https://mantine.dev/core/slider/#control-label) and would be great to have in dmc. The docs hint at this being implemented already with the label argument (Function to generate label or any react node to render instead, set to None to disable label.), but I couldn't get it to work or find an example that explains this.
What I've tried
I guess from Python the most straight-forward way to implement this would be to support passing functions to the label argument of the Slider constructor. Currently, passing label=lambda x: x raises an Error loading layout error.
Thanks!
The text was updated successfully, but these errors were encountered:
Unfortunately, there is no easy solution or workaround for this one.
By default, Dash does not allow for passing functions as props. I would love to implement a solution similar to how it's done with Dash AG Grid
I'll update the feature request to a broader request: Allow functions as props. This feature would be a great addition to dash-mantine-components, as many of Mantine's components accept functions as props
AnnMarieW
changed the title
[Feature Request] Slider support for label formatting.
[Feature Request] Allow functions as props.
Oct 15, 2024
First of - thanks for this awesome library! It's a lot of fun to work with and it really improves the look of the Dash Apps it is used with 😃.
I have a feature request to add support for label formatting on slider elements, e.g.,
40 °C
for values of40
.Background
This is supported in
Mantine
(see https://mantine.dev/core/slider/#control-label) and would be great to have indmc
. The docs hint at this being implemented already with thelabel
argument (Function to generate label or any react node to render instead, set to None to disable label.), but I couldn't get it to work or find an example that explains this.What I've tried
I guess from Python the most straight-forward way to implement this would be to support passing functions to the
label
argument of theSlider
constructor. Currently, passinglabel=lambda x: x
raises anError loading layout
error.Thanks!
The text was updated successfully, but these errors were encountered: