diff --git a/lib/shared/addon/components/form-multi-cluster-targets/component.js b/lib/shared/addon/components/form-multi-cluster-targets/component.js
index 299baaf08..cc9dc5e82 100644
--- a/lib/shared/addon/components/form-multi-cluster-targets/component.js
+++ b/lib/shared/addon/components/form-multi-cluster-targets/component.js
@@ -54,7 +54,7 @@ export default Component.extend({
}
return out;
- });
+ }).filter((c) => !c.disabled); // searchable-select doesn't use the disable flag
}),
diff --git a/lib/shared/addon/components/input-identity/component.js b/lib/shared/addon/components/input-identity/component.js
index 756db8342..43905ca24 100644
--- a/lib/shared/addon/components/input-identity/component.js
+++ b/lib/shared/addon/components/input-identity/component.js
@@ -2,7 +2,7 @@ import { inject as service } from '@ember/service';
import Component from '@ember/component';
import C from 'ui/utils/constants';
import layout from './template';
-import { get, set, computed } from '@ember/object';
+import { get, set, setProperties, computed } from '@ember/object';
export default Component.extend({
access: service(),
@@ -36,7 +36,7 @@ export default Component.extend({
this.sendAction('action', null);
- console.log('Cleared principal');
+ // console.log('@add:Cleared principal');
return;
}
@@ -46,17 +46,8 @@ export default Component.extend({
var input = get(addInput, 'value').trim();
let match = get(this, 'allPrincipals').findBy('id', input);
- var setPrincipal = (principal) => {
- set(this, 'addInput', '');
- set(this, 'selected', principal);
-
- this.sendAction('action', principal);
-
- console.log('Set principal to 1', JSON.stringify(principal));
- }
-
if (match) {
- setPrincipal(match);
+ this.send('selectExact', match);
set(this, 'checking', false);
} else {
@@ -71,7 +62,7 @@ export default Component.extend({
if ( xhr.body && typeof xhr.body === 'object' ) {
let principal = get(xhr, 'body');
- setPrincipal(principal);
+ this.send('selectExact', principal);
}
}).catch((xhr) => {
this.sendAction('onError', `Principal not found: ${ xhr.statusText }`);
@@ -85,11 +76,11 @@ export default Component.extend({
addObject(info) {
this.sendAction('action', info);
- set(this, 'selected', info);
-
- console.log('Set principal to 2', JSON.stringify(info));
-
- set(this, 'filter', get(info, 'name'));
+ setProperties(this, {
+ selected: info,
+ filter: get(info, 'name')
+ });
+ // console.log('@addObject:Set principal:', JSON.stringify(info));
},
selectExact(match) {
@@ -98,9 +89,11 @@ export default Component.extend({
if ( !cur ) {
this.sendAction('action', match);
- set(this, 'selected', match);
-
- console.log('Set principal to 3', JSON.stringify(match));
+ setProperties(this, {
+ addInput: '',
+ selected: match
+ });
+ // console.log('@selectExact:Set principal:', JSON.stringify(match));
}
},
},
diff --git a/lib/shared/addon/components/principal-search/template.hbs b/lib/shared/addon/components/principal-search/template.hbs
index 0572d06e1..fd1b5f543 100644
--- a/lib/shared/addon/components/principal-search/template.hbs
+++ b/lib/shared/addon/components/principal-search/template.hbs
@@ -1 +1,6 @@
-
+