-
-
Notifications
You must be signed in to change notification settings - Fork 66
[Feature Request] Allow functions as props. #356
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
Comments
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!
The text was updated successfully, but these errors were encountered: