Python Dash Agrid Table
The problem is that the table
variable is available and correctly displayed in the console within the first if cell_changed:
block, but it becomes None
in the second, nested if zmiana["colId"]=="price"
and if zmiana["data"]["name"]=="new"
blocks.
@app.callback(
Output('grid-id', 'rowData'),
Input('grid-id', 'cellValueChanged'),
State('grid-id', 'rowData'),
prevent_initial_call=True
)
def update_grid_data(cell_changed, table):
if cell_changed:
print(table) # Here table working , i see dict list table in console
zmiana=cell_changed[0]
if zmiana["colId"]=="price":
if zmiana["data"]["name"]=="new":
print("ok") # This print working ,the if condition is true !
print(table) # here print return None , why ????!!! :)
return table
else:
return no_update