"""Allows the user to select datafiles from the server."""
def__init__(
self,
v_model:str,
directory:str,
extensions:Optional[List[str]]=None,
prefix:str="",
refresh_rate:int=30,
select_strategy:str="all",
v_model:Union[str,Tuple],
directory:Union[str,Tuple],
extensions:Union[List[str],Tuple,None]=None,
prefix:Union[str,Tuple]="",
refresh_rate:Union[int,Tuple]=30,
select_strategy:Union[str,Tuple]="all",
**kwargs:Any,
)->None:
"""Constructor for DataSelector.
Parameters
----------
v_model : str
v_model : Union[str, Tuple]
The name of the state variable to bind to this widget. The state variable will contain a list of the files
selected by the user.
directory : str
directory : Union[str, Tuple]
The top-level folder to expose to users. Only contents of this directory and its children will be exposed to
users.
extensions : List[str], optional
extensions : Union[List[str], Tuple], optional
A list of file extensions to restrict selection to. If unset, then all files will be shown.
prefix : str, optional
prefix : Union[str, Tuple], optional
A subdirectory within the selected top-level folder to show files. If not specified, the user will be shown
a folder browser and will be able to see all files in the selected top-level folder.
refresh_rate : int, optional
refresh_rate : Union[int, Tuple], optional
The number of seconds between attempts to automatically refresh the file list. Set to zero to disable this
feature. Defaults to 30 seconds.
select_strategy : str, optional
select_strategy : Union[str, Tuple], optional
The selection strategy to pass to the `VDataTable component <https://trame.readthedocs.io/en/latest/trame.widgets.vuetify3.html#trame.widgets.vuetify3.VDataTable>`__.
If unset, the `all` strategy will be used.
**kwargs
@@ -74,7 +97,10 @@ class DataSelector(datagrid.VGrid):
Whether or not to allow users to provide their own directories to search for datafiles in. Ignored if the
facility parameter is set.
facility : str, optional
facility : Union[str, Tuple], optional
The facility to restrict data selection to. Options: HFIR, SNS
instrument : str, optional
instrument : Union[str, Tuple], optional
The instrument to restrict data selection to. Please use the instrument acronym (e.g. CG-2).
extensions : List[str], optional
experiment : Union[str, Tuple], optional
The experiment to restrict data selection to.
selected_directory : Union[str, Tuple], optional
The directory containing the visible datafiles.
extensions : Union[List[str], Tuple], optional
A list of file extensions to restrict selection to. If unset, then all files will be shown.
prefix : str, optional
prefix : Union[str, Tuple], optional
A subdirectory within the user's chosen experiment to show files. If not specified, the user will be shown a
folder browser and will be able to see all files in the experiment that they have access to.
refresh_rate : int, optional
refresh_rate : Union[str, Tuple], optional
The number of seconds between attempts to automatically refresh the file list. Set to zero to disable this
feature. Defaults to 30 seconds.
select_strategy : str, optional
select_strategy : Union[str, Tuple], optional
The selection strategy to pass to the `VDataTable component <https://trame.readthedocs.io/en/latest/trame.widgets.vuetify3.html#trame.widgets.vuetify3.VDataTable>`__.