Why Nostr? What is Njump?
2023-01-08 14:02:18
in reply to

dave on Nostr: 'if': { 'column_id': 'expand', 'filter_query': '{expand} eq 1' }, 'display': 'none' ...

'if': {
'column_id': 'expand',
'filter_query': '{expand} eq 1'
},
'display': 'none'
},
{
'if': {
'column_id': 'collapse',
'filter_query': '{collapse} eq 1'
},
'display': 'none'
}
],
style_table={
'maxHeight': '300px',
'overflowY': 'scroll'
},
expand_rows=True
)
])

@app.callback(
Output("table-expand", "data"),
[Input("table-expand", "active_cell")]
)
def expand_row(active_cell):
global df
if active_cell is None:
return df.to_dict('records')
else:
active_row = active_cell['row']
if active_row is None:
return df.to_dict('records')
else:
row_state = active_cell['column_id']
df.loc[active_row, row_state] = df.loc[active_row, row_state]^1
return df.to_dict('records')

if __name__ == '__main__':
app.run_server(debug=True)
Author Public Key
npub1tsgw6pncspg4d5u778hk63s3pls70evs4czfsmx0fzap9xwt203qtkhtk4