Added maxNumberOfItems property (#102)

* DialogAndroid.js - Adding max number of items in a list property
* DialogAndroid.java - Added maxNumOfItems in a list dialog property, and handling so we control the dialog's size.
This commit is contained in:
eladgel
2019-01-02 06:49:15 -08:00
committed by Noitidart
parent b2fa7cc6cd
commit 86341a5bfc
3 changed files with 38 additions and 2 deletions
+6 -1
View File
@@ -32,7 +32,8 @@ type OptionsCommon = {|
neutralColor?: ColorValue,
cancelable?: boolean,
linkColor?: ColorValue, // applies if contentIsHtml is true, and there are <a> elements in content string
forceStacking?: boolean
forceStacking?: boolean,
maxNumberOfItems?: int
|}
type ListItemJustLabel = { label:string };
@@ -41,10 +42,12 @@ type ListItemFull = { label:string, id:any };
type ListItemBare = {};
type OptionsRadio = {|
maxNumberOfItems?: int,
type: typeof ListType.listRadio,
widgetColor?: ColorValue // radio color
|}
type OptionsCheckbox = {|
maxNumberOfItems?: int,
type: typeof ListType.listCheckbox,
neutralIsClear?: boolean,
widgetColor?: ColorValue // checkbox color
@@ -53,10 +56,12 @@ type OptionsCheckbox = {|
type OptionsPicker = {|
...OptionsCommon,
type?: typeof ListType.listPlain,
maxNumberOfItems?: int,
items: ListItemJustLabel[],
|} | {|
...OptionsCommon,
type?: typeof ListType.listPlain,
maxNumberOfItems?: int,
items: ListItemBare[],
labelKey: string
|} | {|