MembersListPreview
Last updated
Last updated
Members List Preview
widget simply displays a list of members. It can be used to display members that were selected by the user in the Members List Selector widget for example.
List of UserInfo
objects.
type: List[UserInfo]
Set the maximum width of the widget in pixels.
type: int
default 300
Text that will be displayed when there are no members in the widget.
type: str
default None
ID of the widget.
type: str
default value: None
In this example we will create a mini app with MembersListPreview
widget. We will create a MembersListSelector
widget and display selected members with MembersListPreview
widget.
You can find this example in our Github repository:
supervisely-ecosystem/ui-widgets-demos/media/019_members_list_preview/src/main.py
First, we load environment variables with credentials and init API for communicating with Supervisely Instance:
MembersListSelector
widgetMembersListPreview
widget and Text
widget for displaying number of selected membersPrepare a layout for app using Card
widget with the content
parameter and place widgets that we've previously created into the Container
widget.
Create an app object with layout parameter.
Parameters | Type | Description |
---|---|---|
Attributes and Methods | Description |
---|---|
users
List[UserInfo]
Supervisely UserInfo
objects
max_width
int
Max width of the widget
empty_text
str
Text that will be displayed when there are no members in widget
widget_id
str
ID of the widget
set()
Set users to the widget.