mirror of
https://github.com/kristoferssolo/LU-bookstore.git
synced 2025-10-21 18:00:34 +00:00
feat(gui): add clear_table method
This commit is contained in:
parent
df6444952d
commit
47537072da
@ -74,8 +74,14 @@ class App(ctk.CTk):
|
||||
submit_button.grid(row=5, column=0, padx=self.PADX, pady=self.PADY)
|
||||
|
||||
def update(self, data=None) -> None:
|
||||
self.clear_table()
|
||||
if data:
|
||||
self.data = data
|
||||
else:
|
||||
self.data = self.inventory.list_all()
|
||||
self.display_table()
|
||||
|
||||
def clear_table(self):
|
||||
for widget in self.grid_slaves():
|
||||
if isinstance(widget, ctk.CTkLabel):
|
||||
widget.destroy()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user