Skip to content

Commit

Permalink
Merge pull request #11869 from momesgin/11743-epic-select
Browse files Browse the repository at this point in the history
Fix select issues
  • Loading branch information
momesgin committed Sep 10, 2024
2 parents 748388f + 47217a4 commit 4d449e9
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 deletions.
4 changes: 2 additions & 2 deletions shell/components/auth/AllowedPrincipals.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import ArrayList from '@shell/components/form/ArrayList';
import Principal from '@shell/components/auth/Principal';
import SelectPrincipal from '@shell/components/auth/SelectPrincipal';
import { _EDIT } from '@shell/config/query-params';
import { addObject } from '@shell/utils/array';
import uniq from 'lodash/uniq';
export default {
components: {
Expand Down Expand Up @@ -56,7 +56,7 @@ export default {
methods: {
addPrincipal(id) {
addObject(this.authConfig.allowedPrincipalIds, id);
this.authConfig.allowedPrincipalIds = uniq([...this.authConfig.allowedPrincipalIds, id]);
},
}
};
Expand Down
2 changes: 1 addition & 1 deletion shell/components/auth/SelectPrincipal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export default {
:filterable="false"
class="select-principal"
:class="{'retain-selection': retainSelection}"
@input="add"
@update:value="add"
@search="onSearch"
@on-open="resetTooltipContent()"
@on-close="setTooltipContent()"
Expand Down
27 changes: 16 additions & 11 deletions shell/components/form/LabeledSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import { LABEL_SELECT_NOT_OPTION_KINDS } from '@shell/types/components/labeledSe
export default {
name: 'LabeledSelect',
inheritAttrs: false,
components: { LabeledTooltip },
mixins: [
CompactInput,
Expand Down Expand Up @@ -247,17 +249,20 @@ export default {
<div
ref="select"
class="labeled-select"
:class="{
disabled: isView || disabled,
focused,
[mode]: true,
[status]: status,
taggable: $attrs.taggable,
taggable: $attrs.multiple,
hoverable: hoverTooltip,
'compact-input': isCompact,
'no-label': !hasLabel,
}"
:class="[
$attrs.class,
{
disabled: isView || disabled,
focused,
[mode]: true,
[status]: status,
taggable: $attrs.taggable,
taggable: $attrs.multiple,
hoverable: hoverTooltip,
'compact-input': isCompact,
'no-label': !hasLabel
}
]"
@click="focusSearch"
@focus="focusSearch"
>
Expand Down

0 comments on commit 4d449e9

Please sign in to comment.