소스 검색

fix offset of data_editor input when page is scrolled (#2208)

Thomas Brandého 1 년 전
부모
커밋
1b402b65be
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      reflex/components/datadisplay/dataeditor.py

+ 5 - 1
reflex/components/datadisplay/dataeditor.py

@@ -345,7 +345,11 @@ class DataEditor(NoSSRComponent):
             def get_ref(self):
                 return None
 
-        return {(-1, "DataEditorPortal"): Portal.create(id="portal")}
+        return {
+            (-1, "DataEditorPortal"): Portal.create(
+                id="portal", style={"position": "fixed", "top": 0}
+            )
+        }
 
 
 # try: