fix: default values in subordinate entities based on static_filtering, add: button visibility callbacks in entities' forms
This commit is contained in:
@@ -24,6 +24,7 @@ EntityFieldCaptionCallable = Callable[["EntityFieldDescriptor", Any, Any], str]
|
||||
@dataclass
|
||||
class FieldEditButton:
|
||||
field_name: str
|
||||
visibility: Callable[[Any], bool] | None = None
|
||||
caption: str | LazyProxy | EntityFieldCaptionCallable | None = None
|
||||
|
||||
|
||||
@@ -31,7 +32,8 @@ class FieldEditButton:
|
||||
class CommandButton:
|
||||
command: str
|
||||
caption: str | LazyProxy | EntityItemCaptionCallable | None = None
|
||||
context_data: ContextData | None = None
|
||||
visibility: Callable[[Any], bool] | None = None
|
||||
context_data: ContextData | Callable[[ContextData, Any], ContextData] | None = None
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -64,7 +66,7 @@ class EntityList:
|
||||
item_form: str | None = None
|
||||
pagination: bool = True
|
||||
static_filters: list[Filter] | Any = None
|
||||
filtering: bool = True
|
||||
filtering: bool = False
|
||||
filtering_fields: list[str] = None
|
||||
order_by: str | Any | None = None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user