Use findItemFromData instead getItemFromData

Depends-on: Ia2110f71d1642f61451cb8acc7e8a930d0feb31f
Bug: T76630
Change-Id: If93d7d85e05c57c65728a7b9dbc7f1c93c9953d8
This commit is contained in:
Prateek Saxena 2017-12-28 11:46:01 +05:30
parent a252da9a15
commit 1e2c39bc0b

View file

@ -650,7 +650,7 @@ mw.TemplateData.Dialog.prototype.changeParamPropertyInput = function ( paramKey,
if ( value !== undefined ) {
// Change the actual input
if ( prop.type === 'select' ) {
propInput.selectItem( propInput.getItemFromData( value ) );
propInput.selectItem( propInput.findItemFromData( value ) );
} else if ( prop.type === 'boolean' ) {
propInput.setSelected( !!value );
} else {
@ -666,7 +666,7 @@ mw.TemplateData.Dialog.prototype.changeParamPropertyInput = function ( paramKey,
} else {
// Empty the input
if ( prop.type === 'select' ) {
propInput.selectItem( propInput.getItemFromData( prop.default ) );
propInput.selectItem( propInput.findItemFromData( prop.default ) );
} else if ( prop.type === 'boolean' ) {
propInput.setSelected( false );
} else {