Hi!
I am trying to set a dash-core-components.Textarea. I would like to fix its height to only one row and define the language used in the element as French.
I tried to change the ‘rows’ and ‘lang’ properties, but I did not find any example of their use. In the documentation, they are both strings. So I tried the following values but none of them worked :
- rows: 1, ‘one’, ‘1’
- lang: ‘french’, ‘fr’
A code so you can test easily:
import dash
import dash_core_components as dcc
import dash_html_components as html
external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css']
app = dash.Dash(__name__, external_stylesheets=external_stylesheets)
app.layout = html.Div([
dcc.Textarea(
id="textarea",
placeholder='Recherche...',
value='Texte en français : baguette et camembert',
rows='1',
title='This is a tooltip',
style={'width': '100%'},
lang='fr'
),
])
if __name__=='__main__':
app.run_server()