From 26cfa74364c9b65fa75a205aa8f7a6934e917fe0 Mon Sep 17 00:00:00 2001 From: anish-work Date: Sat, 10 Aug 2024 02:13:07 +0530 Subject: [PATCH] fix: sticky submit bar zIndex issue --- daras_ai_v2/base.py | 4 +--- daras_ai_v2/doc_search_settings_widgets.py | 15 ++++++++------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/daras_ai_v2/base.py b/daras_ai_v2/base.py index 8e3610a28..82887cd1a 100644 --- a/daras_ai_v2/base.py +++ b/daras_ai_v2/base.py @@ -1308,9 +1308,7 @@ def get_credits_click_url(self): return "/account/" def get_submit_container_props(self): - return dict( - className="position-sticky bottom-0 bg-white", style=dict(zIndex=100) - ) + return dict(className="position-sticky bottom-0 bg-white") def render_submit_button(self, key="--submit-1"): with gui.div(**self.get_submit_container_props()): diff --git a/daras_ai_v2/doc_search_settings_widgets.py b/daras_ai_v2/doc_search_settings_widgets.py index 9b46c9cdf..7562e1fc8 100644 --- a/daras_ai_v2/doc_search_settings_widgets.py +++ b/daras_ai_v2/doc_search_settings_widgets.py @@ -63,13 +63,14 @@ def bulk_documents_uploader( gui.session_state[key] = filter(None, text_value.strip().splitlines()) else: gui.session_state.pop(custom_key, None) - gui.file_uploader( - label, - label_visibility="collapsed", - key=key, - accept=accept, - accept_multiple_files=True, - ) + with gui.div(className="position-relative", style=dict(zIndex=0)): + gui.file_uploader( + label, + label_visibility="collapsed", + key=key, + accept=accept, + accept_multiple_files=True, + ) gui.checkbox("Submit Links in Bulk", key=f"__custom_checkbox_{key}") documents = gui.session_state.setdefault(key, []) try: