🏥 🏭 Working on the COVID-19 response in Canada? Plotly & the Canadian government can help you and your organization. Learn more and get in touch.

Selection in dash component not working

I have a requitment where i need to get selected the sub string from the active cell of the table. But i can’t find any option to get the next so i shift my problem to get the selected sub string from input field and i dound thier is two element selectionStart and selectionEnd but it is not working. i am sharing the code in which i have print the value of selectionStart and selectionEnd on selection of text. but it show None. i am sharing the code

app = dash.Dash(name)
app.layout = html.Div([
html.Br(), html.Br(),
dcc.Input(id=“input_idfg”,value=“hello how are you thier shouuld have selected text”),
html.Br(),
html.Div(id=‘selected-substr’)
])
@app.callback(Output(‘selected-substr’, ‘children’),
[Input(‘input_idfg’, ‘selectionStart’),
Input(‘input_idfg’, ‘selectionEnd’),
],)
def get_active_digit(st, end):
return str(st)+str(end)
app.run_server(debug=True)