I have a dash table where I want one column to be editable. However the editable functionality isn’t super friendly. I was wondering if there was a fairly simple way to change it?
For example, if they edit the table, the only way the change stays if they hit enter. If they click off of it, it doesn’t stay. It just doesn’t seem super intuitive.
Here is my table:
dash_table.DataTable(
id={
'type': 'table',
'index': 'modal-point-table-right'
},
data=[],
columns=[{'id': 'Selections', 'name': 'Selections'},
{'id': 'Scale Factor', 'name': 'Scale Factor',
'editable': True}],
style_cell_conditional=[
{'if': {'column_id': 'Selections'},
'width': '75%'},
{'if': {'column_id': 'Scale Factor'},
'width': '25%'}
],
style_cell={'text-align': 'left',
'border': '1px solid rgb(200,200,200)',
'maxHeight': '8px', 'padding-left': '5px',
'font-family': 'Arial'},
style_table={'height': '400px', 'width': '450px',
'border': '1px solid grey'},
style_data={
'font-size': '12px',
'whiteSpace': 'normal',
'height': '10px',
'lineHeight': '10px',
'color': 'black',
'backgroundColor': 'white',
},
)