Update required field behavior in CustomComponent class

This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-03-31 21:41:33 -03:00
commit ec0ea548f2

View file

@ -77,7 +77,7 @@ The CustomComponent class serves as the foundation for creating custom component
| _`display_name: str`_ | Defines the name of the field. |
| _`advanced: bool`_ | Hide the field in the canvas view (displayed component settings only). Useful when a field is for advanced users. |
| _`password: bool`_ | To mask the input text. Useful to hide sensitive text (e.g. API keys). |
| _`required: bool`_ | Forces the field to be required. Only use this if type hints are not enough to indicate that the field is required. |
| _`required: bool`_ | This is determined automatically but can be used to override the default behavior. |
| _`info: str`_ | Adds 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_. |
| _`range_spec: langflow.field_typing.RangeSpec`_ | This is a requirement if the _`field_type`_ is _`float`_. Defines the range of values accepted and the step size. If none is defined, the default is _`[-1, 1, 0.1]`_. |