sepal_ui.sepalwidgets.inputs.FileInput#
- class sepal_ui.sepalwidgets.inputs.FileInput(**kwargs)[source]#
Custom input field to select a file in the sepal folders.
- Parameters:
extensions (List[str]) – the list of the allowed extensions. the FileInput will only display these extension and folders
folder (Path) – the starting folder of the file input
label (str) – the label of the input
v_model (Unicode) – the default value
clearable (bool) – whether or not to make the widget clearable. default to False
root (Unicode) – the root folder from which you cannot go higher in the tree.
kwargs – any parameter from a v.Flex abject. If set, ‘children’ will be overwritten.
Attributes
ICON_STYLE
the style applied to the icons in the file menu
clear
clear btn to remove everything and set back to the ini folder
close_menu
extensions
the extensions list
file
the current file
file_list
the list of files and folder that are available in the current folder
file_menu
the menu that hide and show the file_list
folder
the current folder
initial_folder
the starting point of the file input
loading
loading top bar of the menu component
reload
reload btn to reload the file list on the current folder
root
the root folder from which you cannot go higher in the tree.
selected_file
the textfield where the file pathname is stored
v_model
the v_model of the input
Methods
Custom input field to select a file in the sepal folders.
Clear the File selection and move to the root folder.
Manually select a file from it's path.
- FileInput.__init__(extensions=[], folder=PosixPath('/home/docs'), label='search file', v_model='', clearable=False, root='', cache=False, **kwargs)[source]#
Custom input field to select a file in the sepal folders.
- Parameters:
extensions (List[str]) – the list of the allowed extensions. the FileInput will only display these extension and folders
folder (str | Path) – the starting folder of the file input
label (str) – the label of the input
v_model (str) – the default value
clearable (bool) – whether or not to make the widget clearable. default to False
root (str | Path) – the root folder from which you cannot go higher in the tree.
kwargs – any parameter from a v.Flex abject. If set, ‘children’ will be overwritten.
- Return type:
None