mirror of https://github.com/rancher/ui.git
Focus name when switching sidekicks
This commit is contained in:
parent
62eaf29640
commit
4fa7ddfe34
|
|
@ -38,7 +38,12 @@ export default Ember.Component.extend(NewOrEdit, SelectTab, {
|
||||||
if ( this.$() )
|
if ( this.$() )
|
||||||
{
|
{
|
||||||
this.$().children('[data-launchindex]').addClass('hide');
|
this.$().children('[data-launchindex]').addClass('hide');
|
||||||
this.$().children('[data-launchindex="'+index+'"]').removeClass('hide');
|
var body = this.$().children('[data-launchindex="'+index+'"]')[0];
|
||||||
|
if ( body )
|
||||||
|
{
|
||||||
|
$(body).removeClass('hide');
|
||||||
|
$("INPUT[type='text']", body)[0].focus();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ export function debouncedObserver(...args) {
|
||||||
|
|
||||||
return Ember.observer.apply(Ember, keys.concat(function() {
|
return Ember.observer.apply(Ember, keys.concat(function() {
|
||||||
Ember.run.debounce(this, function() {
|
Ember.run.debounce(this, function() {
|
||||||
if ( this.state !== 'destroying' ) {
|
if ( this._state !== 'destroying' ) {
|
||||||
opt[0].apply(this);
|
opt[0].apply(this);
|
||||||
}
|
}
|
||||||
}, opt[1] || 250, opt[2] || false);
|
}, opt[1] || 250, opt[2] || false);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue