Skip to content

Commit

Permalink
Merge pull request #53 from reflex-dev/lendemor/readd_colDef_in_cell_…
Browse files Browse the repository at this point in the history
…spec

fix missing colDef
  • Loading branch information
Lendemor authored Nov 21, 2024
2 parents f0be462 + c508648 commit 654b477
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 0 additions & 1 deletion custom_components/reflex_ag_grid/ag_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ def _on_cell_event_spec(event: rx.Var) -> list[rx.Var]:
"api",
"columnApi",
"column",
"colDef",
"node",
"event",
"eventPath",
Expand Down
8 changes: 6 additions & 2 deletions custom_components/reflex_ag_grid/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}
):
Expand Down Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "reflex-ag-grid"
version = "0.0.9"
version = "0.0.10"
description = "AGGrid wrapping for Reflex"
readme = "README.md"
license = { text = "Apache-2.0" }
Expand Down

0 comments on commit 654b477

Please sign in to comment.