add column resize for data editor (#2099)

This commit is contained in:
Thomas Brandého 2023-11-02 20:22:35 +01:00 committed by GitHub
parent fbedc9447e
commit eeeab441d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -244,6 +244,7 @@ class DataEditor(NoSSRComponent):
"on_finished_editing": lambda new_value, movement: [new_value, movement],
"on_row_appended": lambda: [],
"on_selection_cleared": lambda: [],
"on_column_resize": lambda col, width: [col, width],
}
def _get_hooks(self) -> str | None:

View File

@ -3,7 +3,7 @@
# This file was generated by `scripts/pyi_generator.py`!
# ------------------------------------------------------
from typing import Dict, Union, Literal, overload, List, Any, Optional
from typing import List, Any, Optional, Literal, overload, Dict, Union
from reflex.vars import Var, BaseVar, ComputedVar
from reflex.event import EventChain, EventHandler, EventSpec
from reflex.style import Style
@ -115,6 +115,9 @@ class DataEditor(NoSSRComponent):
on_cell_edited: Optional[
Union[EventHandler, EventSpec, List, function, BaseVar]
] = None,
on_column_resize: Optional[
Union[EventHandler, EventSpec, List, function, BaseVar]
] = None,
on_delete: Optional[
Union[EventHandler, EventSpec, List, function, BaseVar]
] = None,