Kmenger has uploaded a new change for review. https://gerrit.wikimedia.org/r/194384
Change subject: SelectWidget: Add example and link to decorated option widget ...................................................................... SelectWidget: Add example and link to decorated option widget Change-Id: Id527cd226696cc13a764c7bf8bdcb1d74f337e7b --- M src/widgets/SelectWidget.js 1 file changed, 21 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/84/194384/1 diff --git a/src/widgets/SelectWidget.js b/src/widgets/SelectWidget.js index de74326..4238089 100644 --- a/src/widgets/SelectWidget.js +++ b/src/widgets/SelectWidget.js @@ -4,9 +4,28 @@ * {@link OO.ui.RadioSelectWidget radio selects}, and {@link OO.ui.MenuSelectWidget * menu selects}. * - * This class should be used together with OO.ui.OptionWidget. + * This class should be used together with OO.ui.OptionWidget or OO.ui.DecoratedOptionWidget. For more + * information, please see the [OOjs UI documentation on MediaWiki][1]. * - * For more information, please see the [OOjs UI documentation on MediaWiki][1]. + * @example + * // Example of a select widget with three options + * var select=new OO.ui.SelectWidget( { + * items: [ + * new OO.ui.OptionWidget( { + * data: 'a', + * label: 'Option One', + * } ), + * new OO.ui.OptionWidget( { + * data: 'b', + * label: 'Option Two', + * } ), + * new OO.ui.OptionWidget( { + * data: 'c', + * label: 'Option Three', + * } ), + * ] + * } ); + * $('body').append(select.$element); * * [1]: https://www.mediawiki.org/wiki/OOjs_UI/Widgets/Selects_and_Options * -- To view, visit https://gerrit.wikimedia.org/r/194384 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id527cd226696cc13a764c7bf8bdcb1d74f337e7b Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: Kmenger <kmen...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits