Interface IGeneralSelectorDataProvider
- Namespace
- Kentico.Xperience.Admin.Base.FormAnnotations
- Assembly
- Kentico.Xperience.Admin.Base.Shared.dll
Defines the contract that provides the General selector data.
public interface IGeneralSelectorDataProvider
- Extension Methods
Methods
GetItemsAsync(string, int, CancellationToken)
Returns paged items that will be displayed in the general selector drop down list.
Task<PagedSelectListItems<string>> GetItemsAsync(string searchTerm, int pageIndex, CancellationToken cancellationToken)
Parameters
searchTerm
stringThe search term entered in the user interface. Is empty when the user interface initializes.
pageIndex
intThe zero-based page index. The page size can be of any value but must be consistent across all requests.
cancellationToken
CancellationTokenThe cancellation instruction.
Returns
- Task<PagedSelectListItems<string>>
GetSelectedItemsAsync(IEnumerable<string>, CancellationToken)
Transforms the selected values collection into the selector items (value/text) collection.
Task<IEnumerable<ObjectSelectorListItem<string>>> GetSelectedItemsAsync(IEnumerable<string> selectedValues, CancellationToken cancellationToken)
Parameters
selectedValues
IEnumerable<string>The selected values to be displayed in the selector when it loads.
cancellationToken
CancellationTokenThe cancellation instruction.
Returns
- Task<IEnumerable<ObjectSelectorListItem<string>>>
Remarks
This method is called only when the component properties dialog is opened and there are some items already selected in the selector.