Transfer List
A transfer list (or "shuttle") enables the user to move one or more list items between lists.

Simple Transfer List

Create a simple transfer list.
1
New-UDTransferList -Item {
2
New-UDTransferListItem -Name 'test1' -Value 1
3
New-UDTransferListItem -Name 'test2' -Value 2
4
New-UDTransferListItem -Name 'test3' -Value 3
5
New-UDTransferListItem -Name 'test4' -Value 4
6
New-UDTransferListItem -Name 'test5' -Value 5
7
}
Copied!

Transfer List Value on Change

Use the OnChange event handler to get the value of the selected items.
1
New-UDTransferList -Item {
2
New-UDTransferListItem -Name 'test1' -Value 1
3
New-UDTransferListItem -Name 'test2' -Value 2
4
New-UDTransferListItem -Name 'test3' -Value 3
5
New-UDTransferListItem -Name 'test4' -Value 4
6
New-UDTransferListItem -Name 'test5' -Value 5
7
} -OnChange {
8
Show-UDToast ($EventData | ConvertTo-Json)
9
}
Copied!

Transfer List in a Form

Transfer lists can be used within forms and steppers.
1
New-UDForm -Content {
2
New-UDTransferList -Item {
3
New-UDTransferListItem -Name 'test1' -Value 1
4
New-UDTransferListItem -Name 'test2' -Value 2
5
New-UDTransferListItem -Name 'test3' -Value 3
6
New-UDTransferListItem -Name 'test4' -Value 4
7
New-UDTransferListItem -Name 'test5' -Value 5
8
}
9
} -OnSubmit {
10
Show-UDToast ($EventData | ConvertTo-Json)
11
}
Copied!
Last modified 1mo ago