📝 docs(custom.mdx): update table formatting and clarify field_type and options usage in custom component documentation
📝 docs(custom-component.mdx): remove is_list from function field and clarify options usage in build_config method
This commit is contained in:
parent
784f813dc5
commit
1d47d47c4d
2 changed files with 16 additions and 19 deletions
|
|
@ -34,19 +34,19 @@ The top level keys are the field names.
|
|||
|
||||
Their values are of type _`dict`_ with any of the following keys (all of them are **optional**):
|
||||
|
||||
| Key | Description |
|
||||
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| _`field_type: str`_ | The type of the field (can be any of the types supported by the _`build`_ method) |
|
||||
| _`is_list: bool`_ | If the field is a list |
|
||||
| _`options: List[str]`_ | If, and only if, the _`is_list`_ is _`True`_, this defines the options to be displayed. If you set the _`value`_ attribute to one of the options, it will be selected by default. Having _`is_list`_ and _`options`_ will display a dropdown menu. |
|
||||
| _`multiline: bool`_ | When the field is a string, if it should be multiline |
|
||||
| _`input_types: List[str]`_ | To be used when you want a _`str`_ field to have connectable handles |
|
||||
| _`display_name: str`_ | To define the name of the field |
|
||||
| _`advanced: bool`_ | To hide the field in default view |
|
||||
| _`password: bool`_ | To mask the input text |
|
||||
| _`required: bool`_ | To make the field required |
|
||||
| _`info: str`_ | To add a tooltip to the field |
|
||||
| _`file_types: List[str]`_ | This is a requirement if the _`field_type`_ is file. Defines which file types will be accepted. For example, json, yaml or yml |
|
||||
| Key | Description |
|
||||
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| _`field_type: str`_ | The type of the field (can be any of the types supported by the _`build`_ method) |
|
||||
| _`is_list: bool`_ | If the field is a list |
|
||||
| _`options: List[str]`_ | This defines the options to be displayed. The _`field_type`_ should invariably be _`str`_. If you set the _`value`_ attribute to one of the options, it will be selected by default. Having _`options`_ will display a dropdown menu. |
|
||||
| _`multiline: bool`_ | When the field is a string, if it should be multiline |
|
||||
| _`input_types: List[str]`_ | To be used when you want a _`str`_ field to have connectable handles |
|
||||
| _`display_name: str`_ | To define the name of the field |
|
||||
| _`advanced: bool`_ | To hide the field in default view |
|
||||
| _`password: bool`_ | To mask the input text |
|
||||
| _`required: bool`_ | To make the field required |
|
||||
| _`info: str`_ | To add a tooltip to the field |
|
||||
| _`file_types: List[str]`_ | This is a requirement if the _`field_type`_ is file. Defines which file types will be accepted. For example, json, yaml or yml |
|
||||
|
||||
Now we can load the flow using the _`load_flow`_ method.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue