How to use the @uipath/angular/directives/ui-virtual-scroll-range-loader.VirtualScrollItemStatus.loaded function in @uipath/angular

To help you get started, we’ve selected a few @uipath/angular examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github UiPath / angular-components / projects / angular / components / src / ui-suggest / utils / items.utils.ts View on Github external
.forEach((item, chunkIndex) => {
            const itemIndex = chunkIndex + start;
            if (items[itemIndex] && items[itemIndex].loading !== VirtualScrollItemStatus.loaded) {
                items[itemIndex] = item;
            }
        });
    return items;
github UiPath / angular-components / projects / angular / components / ui-suggest / src / ui-suggest.component.ts View on Github external
public updateValue(inputValue: ISuggestValue | string, closeAfterSelect = true, refocus = true) {
        const value = toSuggestValue(inputValue, this._isOnCustomValueIndex);
        if (value.loading !== VirtualScrollItemStatus.loaded) { return; }

        const isItemSelected = this.isItemSelected(value);

        if (!isItemSelected && value) {
            if (!this.multiple) {
                this._clearSelection();
            }
            this._pushEntry(value);
        }

        if (
            this.multiple &&
            isItemSelected &&
            !!value
        ) {
            this._removeEntry(value);
github UiPath / angular-components / projects / angular / components / src / ui-suggest / utils / items.utils.ts View on Github external
export function toSuggestValue(inputValue: ISuggestValue | string, isCustom: boolean = false) {
    return typeof inputValue === 'string' ?
        {
            id: inputValue.trim(),
            text: inputValue.trim(),
            loading: VirtualScrollItemStatus.loaded,
            isCustom,
        } as ISuggestValue :
        inputValue;
}