From c76feeeed6dba85b75a3958c466a04e566e012d5 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Thu, 31 Oct 2024 11:02:19 -0700 Subject: [PATCH 1/2] fix typo in dataeditor prop --- reflex/components/datadisplay/dataeditor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reflex/components/datadisplay/dataeditor.py b/reflex/components/datadisplay/dataeditor.py index 1caf053b5f6..e30bd12975b 100644 --- a/reflex/components/datadisplay/dataeditor.py +++ b/reflex/components/datadisplay/dataeditor.py @@ -206,7 +206,7 @@ class DataEditor(NoSSRComponent): get_cell_content: Var[str] # Allow selection for copying. - get_cell_for_selection: Var[bool] + get_cells_for_selection: Var[bool] # Allow paste. on_paste: Var[bool] From 7298c671b806d3c9026cd0aa9b180828948ede4f Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Thu, 31 Oct 2024 11:05:32 -0700 Subject: [PATCH 2/2] move other ones as well --- reflex/components/datadisplay/dataeditor.py | 2 +- reflex/components/datadisplay/dataeditor.pyi | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/reflex/components/datadisplay/dataeditor.py b/reflex/components/datadisplay/dataeditor.py index e30bd12975b..27ca62d9349 100644 --- a/reflex/components/datadisplay/dataeditor.py +++ b/reflex/components/datadisplay/dataeditor.py @@ -424,7 +424,7 @@ def create(cls, *children, **props) -> Component: props["theme"] = DataEditorTheme(**theme) # Allow by default to select a region of cells in the grid. - props.setdefault("get_cell_for_selection", True) + props.setdefault("get_cells_for_selection", True) # Disable on_paste by default if not provided. props.setdefault("on_paste", False) diff --git a/reflex/components/datadisplay/dataeditor.pyi b/reflex/components/datadisplay/dataeditor.pyi index 558333cec84..b1ff93c386b 100644 --- a/reflex/components/datadisplay/dataeditor.pyi +++ b/reflex/components/datadisplay/dataeditor.pyi @@ -140,7 +140,7 @@ class DataEditor(NoSSRComponent): ] = None, data: Optional[Union[List[List[Any]], Var[List[List[Any]]]]] = None, get_cell_content: Optional[Union[Var[str], str]] = None, - get_cell_for_selection: Optional[Union[Var[bool], bool]] = None, + get_cells_for_selection: Optional[Union[Var[bool], bool]] = None, on_paste: Optional[Union[Var[bool], bool]] = None, draw_focus_ring: Optional[Union[Var[bool], bool]] = None, fixed_shadow_x: Optional[Union[Var[bool], bool]] = None, @@ -228,7 +228,7 @@ class DataEditor(NoSSRComponent): columns: Headers of the columns for the data grid. data: The data. get_cell_content: The name of the callback used to find the data to display. - get_cell_for_selection: Allow selection for copying. + get_cells_for_selection: Allow selection for copying. on_paste: Allow paste. draw_focus_ring: Controls the drawing of the focus ring. fixed_shadow_x: Enables or disables the overlay shadow when scrolling horizontally.