Skip to content

Commit

Permalink
fix(vuetify): Set proxyType as explicit property
Browse files Browse the repository at this point in the history
  • Loading branch information
Jo-Byr committed Dec 20, 2024
1 parent 4e0e140 commit e7adbbb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/definitions.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ The __YAML__ structure follow the given hierarchy:
1. type: Name of the domain class
2. name: (optional) identifier when we don't want to use its `type` as identifier.
3. **: additional parameters specific to domain type expectation.
2. proxyType: Name of proxy used in proxy lists

# Domain definitions

Expand Down
6 changes: 5 additions & 1 deletion trame_simput/core/ui/resolvers/vuetify.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def __init__(self):

def get_widget(self, elem):
model = self._model.get(elem.get("name"), {})
attributes = {key: model[key] for key in model if not key.startswith("_")}
attributes = {}
if elem.tag in VUETIFY_MAP:
return VUETIFY_MAP[elem.tag], attributes
elif elem.tag == "input":
Expand Down Expand Up @@ -79,6 +79,10 @@ def get_widget(self, elem):

if self._model.get(elem.get("name"), {}).get("type", "string") == "bool":
widget = "sw-switch"

proxy_type = model.get("proxyType", None)
if proxy_type is not None:
attributes["proxyType"] = proxy_type

return widget, attributes
elif elem.tag == "proxy":
Expand Down

0 comments on commit e7adbbb

Please sign in to comment.