🐛 fix(component.py): add support for "documentation" field in template_config to properly handle component documentation
🐛 fix(types.py): update_attributes function now updates frontend_node with "documentation" field from template_config
This commit is contained in:
parent
38b6831b57
commit
e5e23a1da6
2 changed files with 6 additions and 0 deletions
|
|
@ -66,6 +66,9 @@ class Component(BaseModel):
|
|||
elif "beta" in item_name:
|
||||
template_config["beta"] = ast.literal_eval(item_value)
|
||||
|
||||
elif "documentation" in item_name:
|
||||
template_config["documentation"] = ast.literal_eval(item_value)
|
||||
|
||||
return template_config
|
||||
|
||||
def build(self, *args: Any, **kwargs: Any) -> Any:
|
||||
|
|
|
|||
|
|
@ -199,6 +199,9 @@ def update_attributes(frontend_node, template_config):
|
|||
if "beta" in template_config:
|
||||
frontend_node["beta"] = template_config["beta"]
|
||||
|
||||
if "documentation" in template_config:
|
||||
frontend_node["documentation"] = template_config["documentation"]
|
||||
|
||||
|
||||
def build_field_config(custom_component: CustomComponent):
|
||||
"""Build the field configuration for a custom component"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue