Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LPS-93575 SF #71598

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -130,6 +130,10 @@ class AssetVocabularyCategoriesSelector extends Component {
this.selectedItems = event.data.selectedItems;
}

_handleSyncInputValue(val) {
this._inputValue = val.newVal;
}

syncSelectedItems() {
this.categoryIds = this._getCategoryIds();
}
Expand Down Expand Up @@ -176,6 +180,27 @@ class AssetVocabularyCategoriesSelector extends Component {

AssetVocabularyCategoriesSelector.STATE = {

/**
* Synchronizes the input value of MultiSelect.
* @default undefined
* @instance
* @memberof AssetVocabularyCategoriesSelector
* @private
* @type {?(string|undefined)}
*/

_inputValue: Config.string().internal(),

/**
* @default false
* @instance
* @memberof AssetVocabularyCategoriesSelector
* @private
* @type {?bool}
*/

_unexistingCategoryError: Config.bool().value(false),

/**
* Flag to indicate whether input can create item.
* @default false
Expand Down
Expand Up @@ -13,6 +13,8 @@
{@param? _handleInputOnBlur: any}
{@param? _handleItemAdded: any}
{@param? _handleItemRemoved: any}
{@param? _handleSyncInputValue: any}
{@param? _inputValue: string}
{@param? _typedCategory: string}
{@param? _unexistingCategoryError: bool}
{@param? categoryIds: string}
Expand All @@ -28,14 +30,16 @@
{param autocompleteFilterCondition: 'label' /}
{param dataSource: $_dataSource ?: [] /}
{param events: [
'selectButtonClick': $_handleButtonClicked,
'inputBlur': $_handleInputOnBlur,
'inputFocus': $_handleInputFocus,
'inputValueChanged': $_handleSyncInputValue,
'labelItemAdded': $_handleItemAdded,
'labelItemRemoved': $_handleItemRemoved
'labelItemRemoved': $_handleItemRemoved,
'selectButtonClick': $_handleButtonClicked
] /}
{param helpText: '' /}
{param inputName: $inputName /}
{param inputValue: $_inputValue /}
{param ref: 'multiSelect' /}
{param selectedItems: $selectedItems /}
{param spritemap: $spritemap /}
Expand Down
Expand Up @@ -99,10 +99,13 @@ class AssetTagsSelector extends Component {
window[this.addCallback](event.data.item);
}

this.emit('itemAdded', {
item: event.data.item,
selectedItems: this.selectedItems
});
this.emit(
'itemAdded',
{
item: event.data.item,
selectedItems: this.selectedItems
}
);
}

/**
Expand All @@ -120,10 +123,13 @@ class AssetTagsSelector extends Component {
window[this.removeCallback](event.data.item);
}

this.emit('itemRemoved', {
item: event.data.item,
selectedItems: this.selectedItems
});
this.emit(
'itemRemoved',
{
item: event.data.item,
selectedItems: this.selectedItems
}
);
}

/**
Expand Down