mirror of
https://github.com/kristoferssolo/LU-bookstore.git
synced 2025-10-21 18:00:34 +00:00
fix(gui): show empty
Dispaly empty table if nothing was found
This commit is contained in:
parent
4843f74dff
commit
b189e49fb9
@ -86,7 +86,6 @@ class App(ctk.CTk):
|
|||||||
authors = self.inventory.find_by_author(value)
|
authors = self.inventory.find_by_author(value)
|
||||||
if authors:
|
if authors:
|
||||||
data += authors
|
data += authors
|
||||||
|
|
||||||
self.refresh(data)
|
self.refresh(data)
|
||||||
|
|
||||||
# Bind the search function to the <Enter> key press
|
# Bind the search function to the <Enter> key press
|
||||||
@ -199,7 +198,8 @@ class App(ctk.CTk):
|
|||||||
def refresh(self, data=None) -> None:
|
def refresh(self, data=None) -> None:
|
||||||
"""Update the table with new data or reset it."""
|
"""Update the table with new data or reset it."""
|
||||||
self.clear_table()
|
self.clear_table()
|
||||||
self.data = data if data else self.inventory.list_all()
|
self.data = data if data is not None else self.inventory.list_all()
|
||||||
|
logger.debug(self.data)
|
||||||
self.display()
|
self.display()
|
||||||
|
|
||||||
@logger.catch
|
@logger.catch
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user