Tabulator callback - make server call

Hi all,

I’m learning tabulator now and in a “cell edited” callback I am making a server call.

Unfortunately, the server call appears to be ignored.

Perhaps I have not had enough coffee yet today :upside_down_face:

For example, here is the “cell edited” callback:

def tabulator_cell_edited(self, field, row, **event_args):
  new_dict={field: row[field]}
  print('new', new_dict)
  anvil.server.call('edit_data', row['row_id'], new_dict)
  print('here in client')

And here is the server call:

@anvil.server.callable
def edit_data(row_id, **new_dict):
  print('here')
  row=app_tables.users.get_by_id(row_id)
  row.update(**new_dict)

new_dict gets printed but nothing in the server is printed and “here in client” is also not printed. There are no errors.

Any ideas what is going on here?

Ooo, interesting.

I put my kwarg asterisks in the function signature.

Once I removed them, everything worked as expected.

Yikes.

1 Like

This should work in the next couple of days. It’s a bug I also noticed when making the move to anvil.js.window. The fix exists and will be on its way to you soon.

Sorry about that! Will let you know when it’s live.

(It’s an issue related to converting between JavaScript promises that then get converted to blocking code in python)

Edit: this has now been fixed

2 Likes