Open jincheeva opened 1 month ago
Hi @jincheeva I can't reproduce the issue. Can you share a demo?
Thank you for your response. This is the video of the screen when we run the code below. We set the initial value of the colorpicker to be "#343353" but the colorpicker shows the white color in the upper left corner. https://github.com/snehilvj/dash-mantine-components/assets/168907889/ee45d17e-a72d-45c3-b412-ed5359f3a4d2
import dash_mantine_components as dmc from dash import Dash, Output, Input, html, callback
app = Dash()
app.layout = html.Div( [ dmc.ColorPicker(id="color-picker", format="hex", value="#343353"), dmc.Space(h=10), dmc.Text(id="selected-color"), ] )
@callback(Output("selected-color", "children"), Input("color-picker", "value")) def pick(color): return color
if name == "main": app.run(debug=True)
I don't face this issue in the latest version of dmc. Can you please confirm your version?
Thank you so much for your investigation and your reply. I was using version 0.12. After switching to version 0.14, I can confirm that the issue has been resolved. The colorpicker works well in version 0.14. Thank you so much.
The color picker works well when we pick a color. However, when we set the color value to the component, it doesn't display that color. Please use the following code to replicate the issue:
import dash_mantine_components as dmc import dash_bootstrap_components as dbc from dash import Dash, html, Input, Output, callback
app = Dash(name)
app.layout = html.Div( [ dmc.ColorPicker(id="color-picker", format="hex"), dbc.Input(id="color-input", debounce=True), ] )
@app.callback( Output("color-picker", "value"), Input("color-input", "value"), ) def input_(color): return color
if name == "main": app.run(debug=True)