Hi I would like to know how to clear dbc.Input after enter event.
I try to build barcode scanner to read EAN into a Input.
Steps:
1-Read ean barcode
2-Send this EAN to a Div (this need receive multiples barcodes).
3-cleanup dbc.Input
This is possible using Dash?
import dash
import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output, State
import pandas as pd
#app = dash.Dash(__name__, external_stylesheets=[dbc.themes.BOOTSTRAP])
app = dash.Dash(__name__)
app.layout = html.Div([
dbc.Row(dbc.Col(html.H3("Maturação de Gelo"),
width={'size':6, 'offset':3},
),
),
dbc.Row(dbc.Col(html.Div([
dbc.Input(id='input', type='text'),
html.Br(),
html.P(id="output"),
]),width={'size':6, 'offset':3}
)
)
])
@app.callback(
Output("output", "children"),
[Input("input", "n_submit")],
[State('input', 'value')])
def output_text(n_submit, value):
return value
if __name__ == '__main__':
app.run_server(debug=True)