mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TemplateData
synced 2024-11-27 17:20:01 +00:00
Adapt the type input to work with the new ooui getMenu()
The type in the templatedata editor didn't update because the events were attached to the previous ooui SelectWidget, and should be adjusted to use the new methods. Bug: T86922 Change-Id: I619d1cc69f672d2d03d7dafa97ba3d950de9d89d
This commit is contained in:
parent
b4fb04a142
commit
edf70972e1
|
@ -327,7 +327,7 @@
|
|||
allProps = TemplateDataModel.static.getAllProperties( true );
|
||||
|
||||
if ( property === 'type' ) {
|
||||
value = this.propInputs[property].getSelectedItem() ? this.propInputs[property].getSelectedItem().getData() : 'undefined';
|
||||
value = this.propInputs[property].getMenu().getSelectedItem() ? this.propInputs[property].getMenu().getSelectedItem().getData() : 'undefined';
|
||||
}
|
||||
|
||||
// TODO: Validate the name
|
||||
|
@ -538,7 +538,7 @@
|
|||
} );
|
||||
// Event
|
||||
if ( props === 'type' ) {
|
||||
propInput.connect( this, { choose: [ 'onParamPropertyInputChange', props ] } );
|
||||
propInput.getMenu().connect( this, { choose: [ 'onParamPropertyInputChange', props ] } );
|
||||
} else {
|
||||
propInput.connect( this, { change: [ 'onParamPropertyInputChange', props ] } );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue