Skip to content

Commit

Permalink
convert ComboBoxItem from class to type, phetsims/sun#768
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Jun 27, 2022
1 parent a284ee9 commit a17af7a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions js/ComboBoxDisplay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ import NumberProperty from '../../axon/js/NumberProperty.js';
import optionize, { combineOptions } from '../../phet-core/js/optionize.js';
import StringUtils from '../../phetcommon/js/util/StringUtils.js';
import { Node } from '../../scenery/js/imports.js';
import ComboBox, { ComboBoxOptions } from '../../sun/js/ComboBox.js';
import ComboBoxItem from '../../sun/js/ComboBoxItem.js';
import ComboBox, { ComboBoxItem, ComboBoxOptions } from '../../sun/js/ComboBox.js';
import NumberDisplay, { NumberDisplayOptions } from './NumberDisplay.js';
import PhetFont from './PhetFont.js';
import sceneryPhet from './sceneryPhet.js';
Expand Down Expand Up @@ -110,9 +109,11 @@ export default class ComboBoxDisplay extends ComboBox<number> {
itemNode.maxWidth = itemNode.width;
itemNode.maxHeight = itemNode.height;

comboBoxItems.push( new ComboBoxItem( itemNode, item.choice, {
comboBoxItems.push( {
value: item.choice,
node: itemNode,
tandemName: item.tandemName || null
} ) );
} );
} );

super( choiceProperty, comboBoxItems, listParent, options );
Expand Down

0 comments on commit a17af7a

Please sign in to comment.