feat(alert): add attributes min & max to alert inputs of type number

This commit is contained in:
Tom Demulier
2017-03-06 09:55:03 +01:00
parent d666e8b8e5
commit b53219a67c
3 changed files with 18 additions and 4 deletions

View File

@ -19,6 +19,6 @@ export interface AlertInputOptions {
checked?: boolean;
disabled?: boolean;
id?: string;
min?: string;
max?: string;
min?: string | number;
max?: string | number;
}

View File

@ -244,8 +244,12 @@ export class Alert extends ViewController {
* | label | `string` | The input's label (only for radio/checkbox inputs) |
* | checked | `boolean` | Whether or not the input is checked. |
* | id | `string` | The input's id. |
* | min | `string` | The input's minimum authorized value (only for date inputs) |
* | max | `string` | The input's maximum authorized value (only for date inputs) |
* | min | `string | number` | The input's minimum authorized value (string only for date inputs, number
* only for number inputs)
* |
* | max | `string | number` | The input's maximum authorized value (string only for date inputs, number
* only for number inputs)
* |
*
* Button options
*

View File

@ -121,6 +121,16 @@ export class E2EPage {
name: 'name5',
type: 'date'
});
alert.addInput({
name: 'name6',
type: 'number',
min: -5,
max: 10
});
alert.addInput({
name: 'name7',
type: 'number'
});
alert.addButton({
text: 'Cancel',
handler: (data: any) => {