Open paulremo opened 1 month ago
Hi @paulremo
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
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!