Loading pyproject.toml +1 −1 Original line number Diff line number Diff line [tool.poetry] name = "nova-trame" version = "0.17.2" version = "0.17.3" description = "A Python Package for injecting curated themes and custom components into Trame applications" authors = ["Duggan, John <dugganjw@ornl.gov>"] readme = "README.md" Loading src/nova/trame/view/components/input_field.py +6 −1 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ import logging import os import re from enum import Enum from inspect import isclass from typing import Any, Dict, Optional, Union from trame.app import get_server Loading Loading @@ -70,7 +71,11 @@ class InputField: "rules": (f"[(v) => trigger('validate_pydantic_field', ['{field}', v, index])]",), } if field_type in ["autocomplete", "combobox", "select"] and issubclass(field_info.annotation, Enum): if ( field_type in ["autocomplete", "combobox", "select"] and isclass(field_info.annotation) and issubclass(field_info.annotation, Enum) ): args |= {"items": str([option.value for option in field_info.annotation])} if debounce > 0 and throttle > 0: Loading Loading
pyproject.toml +1 −1 Original line number Diff line number Diff line [tool.poetry] name = "nova-trame" version = "0.17.2" version = "0.17.3" description = "A Python Package for injecting curated themes and custom components into Trame applications" authors = ["Duggan, John <dugganjw@ornl.gov>"] readme = "README.md" Loading
src/nova/trame/view/components/input_field.py +6 −1 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ import logging import os import re from enum import Enum from inspect import isclass from typing import Any, Dict, Optional, Union from trame.app import get_server Loading Loading @@ -70,7 +71,11 @@ class InputField: "rules": (f"[(v) => trigger('validate_pydantic_field', ['{field}', v, index])]",), } if field_type in ["autocomplete", "combobox", "select"] and issubclass(field_info.annotation, Enum): if ( field_type in ["autocomplete", "combobox", "select"] and isclass(field_info.annotation) and issubclass(field_info.annotation, Enum) ): args |= {"items": str([option.value for option in field_info.annotation])} if debounce > 0 and throttle > 0: Loading