Handle row clicks and update table cells dynamically
mainWhen creating a table with the func parameter in create_table, you can provide a callback function that receives a row object. This row object allows you to:
- Update values: Modify cell values by treating the row like a dictionary (e.g.,
row['ColumnName'] = new_value). - Change styling: Use
row.background_color(column_name, color)to change the background color of a specific cell based on its value.
You can also use the callback to update other parts of the table, such as the table.footer.