Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #505 : Remove "empty filter" row #511

Merged
merged 5 commits into from
Dec 20, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions ragna/deploy/_ui/components/metadata_filters_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
]

NO_CORPUS_KEY = "No corpuses available"
NO_FILTER_KEY = "Empty Filter"
NO_FILTER_KEY = ""


class FilterRow(pn.viewable.Viewer):
Expand Down Expand Up @@ -146,8 +146,6 @@ def __init__(self, corpus_metadata, **params):

self.corpus_metadata = corpus_metadata

self.filter_rows = self.create_filter_row()

self.add_filter_row_button = pn.widgets.ButtonIcon(
icon="circle-plus", width=25, height=25
)
Expand All @@ -174,10 +172,6 @@ def add_filter_row(self, event):
self.filter_rows = self.filter_rows + self.create_filter_row()

def delete_filter_row(self, event):
if len(self.filter_rows) == 1:
self.reset_filter_rows()
return

filter_row_to_remove = None
for filter_row in self.filter_rows:
if event.obj == filter_row.delete_button:
Expand Down
Loading