Re: [Wikitech-l] OOJS-UI: label/data mechanism in "OO.ui.ComboBoxInputWidget"

2017-02-27 Thread Robert Vogel
Due to a request by a community member, this thread is now also available on http://stackoverflow.com/questions/42502268/oojs-ui-label- data-mechanism-in-oo-ui-comboboxinputwidget -- Robert On Fr, 2017-02-24 at 08:04 +, Robert Vogel wrote: > Hi everybody! > > I'm working on some OOJS-UI compo

Re: [Wikitech-l] OOJS-UI: label/data mechanism in "OO.ui.ComboBoxInputWidget"

2017-02-26 Thread Robert Vogel
Hi Moriel, thanks for your explanations. They're very helpful. The ComboBoxInputWidget example you provided shows my use case very nicely. When you open up the drop down menu you see the options "Option One", "Option Two", "Option Three", ... When you select one of them the (e.g. "Option Three") d

Re: [Wikitech-l] OOJS-UI: label/data mechanism in "OO.ui.ComboBoxInputWidget"

2017-02-25 Thread Moriel Schottlender
Hi Robert, In general, the 'data' property for items inside the GroupElement can be strings or objects, as they represent some state of your item. In OO.ui.mixin.GroupElement, the method "getItemFromData" can then return a specific item based on its data property. If you use an Object for the data

[Wikitech-l] OOJS-UI: label/data mechanism in "OO.ui.ComboBoxInputWidget"

2017-02-24 Thread Robert Vogel
Hi everybody! I'm working on some OOJS-UI components for an extension and I've stumbled across something: The "OO.ui.ComboBoxInputWidget" allows to set an array of "OO.ui.MenuOptionWidget" objects in its "menu.items" config field. Such an item can have a "label" and a "data" field. The "data" f