You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importwriteraswfdefon_record_add(state, payload):
payload.record['sales'] =0# default value inside the dataframestate['df'].record_add(payload)
defon_record_change(state, payload):
state['df'].record_update(payload)
defon_record_action(state, payload):
""" This event corresponds to a quick action in the drop-down menu to the left of the dataframe. """ifpayload.action=='remove':
state['df'].record_remove(payload)
ifpayload.action=='important':
state['df'].record(payload.id).update('flag', True) # update the column flag of the dataframe to true, trigger une mutation record_updateifpayload.action=='open':
state['record'] =state['df'].record(payload.id)
defon_record_select(state, payload):
state['df_selected_record'] =payload['selected']
# trigger on button outside the dataframe editordefon_save_click(state, payload):
state['df'].df.to_csv('file.csv')
initial_state=ss.init_state({
"df": wf.EditableDataframe(
df
)
})
# snippetsstate['df'].df# get the real dataframe datastructurestate['df'].df=df# set a new dataframe, send the entire dataframestate['df'].record_update(payload) # update a record using frontend payloadstate['df'].record_remove(payload) # remove a record using frontend payloadstate['df'].record_add(payload) # add a new record using frontend payload
more in #63
The text was updated successfully, but these errors were encountered: