MembersListSelector
Last updated
Last updated
Members List Selector
widget allows to display list of users with roles.
users
List[UserInfo]
Supervisely UserInfo
objects
multiple
bool
Enable multiple users selection
widget_id
str
ID of the widget
List of UserInfo
objects.
type: List[UserInfo]
If True
then multiple users can be selected. Otherwise, only one user can be selected.
type: bool
default False
ID of the widget.
type: str
default value: None
set()
Set members to widget.
get_selected_members()
Return list of selected members.
select_all()
Select all members.
deselect_all()
Deselect all members.
select()
Select members by names.
deselect()
Deselect members by names.
set_multiple()
Set multiple flag.
get_all_members()
Return list of all members.
@selection_changed
Callback triggers when selection is changed.
You can find this example in our Github repository:
supervisely-ecosystem/ui-widgets-demos/selection/018_members_list_selector/src/main.py
First, we load environment variables with credentials and init API for communicating with Supervisely Instance:
MembersListSelector
widget and Text
widget for displaying selected members countPrepare a layout for app using Card
widget with the content
parameter and place widget that we've just created into the Container
widget.
Create an app object with layout parameter.