From 3cc42956833939c8c5c645407d865912c3248958 Mon Sep 17 00:00:00 2001 From: Lendemor Date: Wed, 20 Nov 2024 21:28:27 +0100 Subject: [PATCH 1/3] fix missing colDef --- custom_components/reflex_ag_grid/ag_grid.py | 1 - custom_components/reflex_ag_grid/wrapper.py | 8 ++++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/custom_components/reflex_ag_grid/ag_grid.py b/custom_components/reflex_ag_grid/ag_grid.py index 9ea0d45..6d2007f 100644 --- a/custom_components/reflex_ag_grid/ag_grid.py +++ b/custom_components/reflex_ag_grid/ag_grid.py @@ -47,7 +47,6 @@ def _on_cell_event_spec(event: rx.Var) -> list[rx.Var]: "api", "columnApi", "column", - "colDef", "node", "event", "eventPath", diff --git a/custom_components/reflex_ag_grid/wrapper.py b/custom_components/reflex_ag_grid/wrapper.py index aedacdd..7ec1f05 100644 --- a/custom_components/reflex_ag_grid/wrapper.py +++ b/custom_components/reflex_ag_grid/wrapper.py @@ -280,7 +280,9 @@ async def _is_authorized( def on_selection_changed(self, rows, source, type): self._selected_items = [self._model_class(**row) for row in rows] - async def on_value_setter(self, row_data: dict[str, Any], field_name: str, value: Any): + async def on_value_setter( + self, row_data: dict[str, Any], field_name: str, value: Any + ): if not await self._is_authorized( ModelWrapperActionType.UPDATE, row_data | {field_name: value} ): @@ -311,7 +313,9 @@ async def on_add(self, row_data: dict[str, Any]): async def delete_selected(self): """Handles deleting selected rows from the model.""" - if not await self._is_authorized(ModelWrapperActionType.DELETE, self._selected_items): + if not await self._is_authorized( + ModelWrapperActionType.DELETE, self._selected_items + ): return with rx.session() as session: for item in session.exec( From 813ae633035c398bb2e5161d315247cee3ecb935 Mon Sep 17 00:00:00 2001 From: Lendemor Date: Wed, 20 Nov 2024 21:35:31 +0100 Subject: [PATCH 2/3] bump to 0.1.0 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a356c9b..9d87b07 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "reflex-ag-grid" -version = "0.0.9" +version = "0.1.0" description = "AGGrid wrapping for Reflex" readme = "README.md" license = { text = "Apache-2.0" } From c5086481622a370704371c088ba2e125ff5b3a2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Brand=C3=A9ho?= Date: Thu, 21 Nov 2024 12:53:43 +0100 Subject: [PATCH 3/3] Update pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9d87b07..7cc6347 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "reflex-ag-grid" -version = "0.1.0" +version = "0.0.10" description = "AGGrid wrapping for Reflex" readme = "README.md" license = { text = "Apache-2.0" }