Fixed bugs in DataGridFormattingManager
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import inspect
|
||||
from dataclasses import dataclass, field
|
||||
from typing import Optional
|
||||
|
||||
@@ -35,7 +36,8 @@ class Menu(MultipleInstance):
|
||||
name
|
||||
for name in dir(commands_obj)
|
||||
if not name.startswith("_")
|
||||
and callable(getattr(commands_obj, name))
|
||||
and callable(attr := getattr(commands_obj, name))
|
||||
and len(inspect.signature(attr).parameters) == 0
|
||||
]
|
||||
|
||||
return {
|
||||
@@ -59,7 +61,7 @@ class Menu(MultipleInstance):
|
||||
Div("|"),
|
||||
*[self._mk_menu(command_name) for command_name in self._state.last_used[:3]]
|
||||
) if self._state.last_used else [],
|
||||
cls="flex"
|
||||
cls="flex mb-1"
|
||||
),
|
||||
id=self._id
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user