What I’m trying to do:
I pulled some code from a clone and it had this line in it:
def delete_button_click(self, **event_args):
"""This method is called when the button is clicked"""
data = self.tabulator_obj.get_selected_data()
if not data:
return
self.delete_button.enabled = False
anvil.js.call("loadSpinner", True)
from time import sleep
sleep(0.15)
indices = [row["id"] for row in data]
self.tabulator_obj.delete_row(indices)
anvil.js.call("loadSpinner", False)
return
Question
Someone with more experience, what is the point of this sleep timer? It doesn’t appear to be a thread object… is timing a concern here?