I have an input box:
dcc.Input(
type=“text”,
id=“srch_for_input”,
placeholder=“Type something”,
)
and a search button:
dbc.Button(“Search”, id =“search_btn”, className=“me-md-2”)
and a simple callback where Input is as follows:
[
Input(“search_btn”, “n_clicks”),
Input(“srch_for_input”, “value”),
],
the callback function is calling an API.
When I type a letter, but before I finish the entire word, the callback is called. It is called for every letter I type. I knows how to trap this in JS and JQuery … but I am stumped here. Please advice how to prevent repeated call until I click the search button. I need to pass the content of the srch_for_input to the callback function, and this is why I have it as an Input. is there a way to pass this value to the function without listing it as a callback input?
Thanks you