mirror of
https://github.com/status-im/react-native-dialogs.git
synced 2026-08-31 03:01:10 +00:00
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:
+6
-1
@@ -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
|
||||
|} | {|
|
||||
|
||||
Reference in New Issue
Block a user