ConfirmDialogProvider Message Bug
"I tried to update the content of Message through a callback function, but it doesn’t seem to work and the function doesn’t print any output values“.
from dash import Input
from dash import Output
from dash import State, MATCH, ALL
from dash import dcc
from dash import html
import dash_mantine_components as dmc
from dash import Dash
from dash import ctx
from dash import no_update
TITLE = "TEST"
text_title = html.H3(TITLE)
input_ID = dmc.TextInput(id="ID", label="ID")
layout = dmc.Container(
[
text_title,
input_ID,
dcc.ConfirmDialogProvider(
id='confirm',
children=dmc.Button(
"submit", id="submit", variant="light"),
message='',
),
],)
app = Dash(__name__, prevent_initial_callbacks=True)
app.title = "__"
app.layout = layout
@app.callback(
Output('confirm', 'message'),
State('ID', 'value'),
Input("submit", 'n_clicks'),
)
def process_input(_input_id, n_clicks):
print(_input_id)
return "Are U Sure?"
if __name__ == '__main__':
app.run_server(debug=True)
Result: