mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TemplateData
synced 2024-11-14 19:27:45 +00:00
Use findItemFromData instead getItemFromData
Depends-on: Ia2110f71d1642f61451cb8acc7e8a930d0feb31f Bug: T76630 Change-Id: If93d7d85e05c57c65728a7b9dbc7f1c93c9953d8
This commit is contained in:
parent
a252da9a15
commit
1e2c39bc0b
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue