I can add a new column and a new row

This commit is contained in:
2026-02-26 22:44:35 +01:00
parent b383b1bc8b
commit c07b75ee72
10 changed files with 311 additions and 108 deletions

View File

@@ -1,3 +1,5 @@
from fastcore.basics import NotStr
from myfasthtml.core.constants import ColumnType
from myfasthtml.icons.fluent import question20_regular, brain_circuit20_regular, number_symbol20_regular, \
number_row20_regular
@@ -13,7 +15,7 @@ default_icons = {
False: checkbox_unchecked20_regular,
"Brain": brain_circuit20_regular,
"QuestionMark" : question20_regular,
"QuestionMark": question20_regular,
# TreeView icons
"TreeViewFolder": folder20_regular,
@@ -46,6 +48,9 @@ class IconsHelper:
:return: The requested icon resource if found; otherwise, returns None.
:rtype: object or None
"""
if isinstance(name, NotStr):
return name
if name in IconsHelper._icons:
return IconsHelper._icons[name]