Bartosz Dziewoński has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/214924

Change subject: DropdownInputWidget: Tweak documentation
......................................................................

DropdownInputWidget: Tweak documentation

* There is no 'label'.
* Document that one of the options is always selected.

Change-Id: Iffaf2b4e6b1e77c72f8bf5c746793db257e5250a
---
M src/widgets/DropdownInputWidget.js
1 file changed, 6 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/24/214924/1

diff --git a/src/widgets/DropdownInputWidget.js 
b/src/widgets/DropdownInputWidget.js
index 34ad15a..131b838 100644
--- a/src/widgets/DropdownInputWidget.js
+++ b/src/widgets/DropdownInputWidget.js
@@ -4,13 +4,16 @@
  * of a hidden HTML `input` tag. Please see the [OOjs UI documentation on 
MediaWiki][1] for
  * more information about input widgets.
  *
+ * A DropdownInputWidget always has a value (one of the options is always 
selected), unless there
+ * are no options. If no `value` configuration option is provided, the first 
option is selected.
+ * If you need a state representing no value (no option being selected), use a 
DropdownWidget.
+ *
  *     @example
  *     // Example: A DropdownInputWidget with three options
  *     var dropDown = new OO.ui.DropdownInputWidget( {
- *         label: 'Dropdown menu: Select a menu option',
  *         options: [
- *             { data: 'a', label: 'First' } ,
- *             { data: 'b', label: 'Second'} ,
+ *             { data: 'a', label: 'First' },
+ *             { data: 'b', label: 'Second'},
  *             { data: 'c', label: 'Third' }
  *         ]
  *     } );

-- 
To view, visit https://gerrit.wikimedia.org/r/214924
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iffaf2b4e6b1e77c72f8bf5c746793db257e5250a
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <matma....@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to