fix(prop): update to mutable option

This commit is contained in:
Adam Bradley
2017-08-31 21:28:00 -05:00
parent 1f2651664a
commit 00c883194c
10 changed files with 28 additions and 28 deletions

View File

@ -38,7 +38,7 @@ export class Alert {
@Prop() subTitle: string;
@Prop() message: string;
@Prop() buttons: AlertButton[] = [];
@Prop({state: true}) inputs: AlertInput[] = [];
@Prop({ mutable: true}) inputs: AlertInput[] = [];
@Prop() enableBackdropDismiss: boolean = true;
@Prop() enterAnimation: AnimationBuilder;

View File

@ -88,17 +88,17 @@ export class Checkbox {
/*
* @input {boolean} If true, the checkbox is checked. Default false.
*/
@Prop({ state: true }) checked: boolean = false;
@Prop({ mutable: true }) checked: boolean = false;
/*
* @input {boolean} If true, the user cannot interact with this element. Default false.
*/
@Prop({ state: true }) disabled: boolean = false;
@Prop({ mutable: true }) disabled: boolean = false;
/**
* @input {string} the value of the checkbox.
*/
@Prop({ state: true }) value: string;
@Prop({ mutable: true }) value: string;
ionViewWillLoad() {

View File

@ -86,7 +86,7 @@ export class Input implements InputComponent {
/**
* @input {boolean} If true, the value will be cleared after focus upon edit. Defaults to `true` when `type` is `"password"`, `false` for all other types.
*/
@Prop({ state: true }) clearOnEdit: boolean;
@Prop({ mutable: true }) clearOnEdit: boolean;
/**
* @input {boolean} If true, the user cannot interact with this element. Defaults to `false`.
@ -184,7 +184,7 @@ export class Input implements InputComponent {
/**
* @input {string} The text value of the input.
*/
@Prop({ state: true }) value: string;
@Prop({ mutable: true }) value: string;
/**

View File

@ -100,7 +100,7 @@ export class Textarea implements TextareaComponent {
/**
* @input {boolean} If true, the value will be cleared after focus upon edit. Defaults to `true` when `type` is `"password"`, `false` for all other types.
*/
@Prop({ state: true }) clearOnEdit: boolean;
@Prop({ mutable: true }) clearOnEdit: boolean;
/**
* @input {boolean} If true, the user cannot interact with this element. Defaults to `false`.
@ -168,7 +168,7 @@ export class Textarea implements TextareaComponent {
/**
* @input {string} The text value of the input.
*/
@Prop({ state: true }) value: string;
@Prop({ mutable: true }) value: string;
/**
* @hidden

View File

@ -76,22 +76,22 @@ export class Searchbar {
/**
* @input {boolean} If true, enable searchbar animation. Default `false`.
*/
@Prop({ state: true }) animated: boolean = false;
@Prop({ mutable: true }) animated: boolean = false;
/**
* @input {string} Set the input's autocomplete property. Values: `"on"`, `"off"`. Default `"off"`.
*/
@Prop({ state: true }) autocomplete: string = 'off';
@Prop({ mutable: true }) autocomplete: string = 'off';
/**
* @input {string} Set the input's autocorrect property. Values: `"on"`, `"off"`. Default `"off"`.
*/
@Prop({ state: true }) autocorrect: string = 'off';
@Prop({ mutable: true }) autocorrect: string = 'off';
/**
* @input {string} Set the the cancel button text. Default: `"Cancel"`.
*/
@Prop({ state: true }) cancelButtonText: string = 'Cancel';
@Prop({ mutable: true }) cancelButtonText: string = 'Cancel';
// _inputDebouncer: TimeoutDebouncer = new TimeoutDebouncer(0);
@ -111,32 +111,32 @@ export class Searchbar {
/**
* @input {number} Set the amount of time, in milliseconds, to wait to trigger the `ionInput` event after each keystroke. Default `250`.
*/
@Prop({ state: true }) debounce: number = 250;
@Prop({ mutable: true }) debounce: number = 250;
/**
* @input {string} Set the input's placeholder. Default `"Search"`.
*/
@Prop({ state: true }) placeholder: string = 'Search';
@Prop({ mutable: true }) placeholder: string = 'Search';
/**
* @input {boolean} If true, show the cancel button. Default `false`.
*/
@Prop({ state: true }) showCancelButton: boolean = false;
@Prop({ mutable: true }) showCancelButton: boolean = false;
/**
* @input {boolean} If true, enable spellcheck on the input. Default `false`.
*/
@Prop({ state: true }) spellcheck: boolean = false;
@Prop({ mutable: true }) spellcheck: boolean = false;
/**
* @input {string} Set the type of the input. Values: `"text"`, `"password"`, `"email"`, `"number"`, `"search"`, `"tel"`, `"url"`. Default `"search"`.
*/
@Prop({ state: true }) type: string = 'search';
@Prop({ mutable: true }) type: string = 'search';
/**
* @input {string} Set the value of the searchbar.
*/
@Prop({ state: true }) value: string;
@Prop({ mutable: true }) value: string;
ionViewDidLoad() {

View File

@ -58,17 +58,17 @@ export class SegmentButton {
/*
* @input {boolean} If true, the button is selected. Default false.
*/
@Prop({ state: true }) checked: boolean = false;
@Prop({ mutable: true }) checked: boolean = false;
/*
* @input {boolean} If true, the user cannot interact with this element. Default false.
*/
@Prop({ state: true }) disabled: boolean = false;
@Prop({ mutable: true }) disabled: boolean = false;
/**
* @input {string} the value of the segment button. Required.
*/
@Prop({ state: true }) value: string;
@Prop({ mutable: true }) value: string;
segmentButtonClick(ev: UIEvent) {
ev.preventDefault();

View File

@ -76,9 +76,9 @@ export class Segment {
@Event() ionChange: EventEmitter;
@Prop({ state: true }) disabled: boolean = false;
@Prop({ mutable: true }) disabled: boolean = false;
@Prop({ state: true }) value: string;
@Prop({ mutable: true }) value: string;
@PropDidChange('value')
changed(val: string) {

View File

@ -15,7 +15,7 @@ export interface SelectPopoverOption {
export class SelectPopover {
@Prop() options: SelectPopoverOption[];
@Prop({ state: true }) value: string;
@Prop({ mutable: true }) value: string;
@PropDidChange('value')
valueChanged(val: string) {

View File

@ -83,7 +83,7 @@ export class Select {
/**
* @input {string} the value of the select.
*/
@Prop({ state: true }) value: string;
@Prop({ mutable: true }) value: string;
// /**
// * @hidden

View File

@ -29,9 +29,9 @@ export class Toggle implements BooleanInputComponent {
@Prop() color: string;
@Prop() mode: string;
@Prop({ state: true }) checked: boolean = false;
@Prop({ state: true }) disabled: boolean = false;
@Prop({ state: true }) value: string;
@Prop({ mutable: true }) checked: boolean = false;
@Prop({ mutable: true }) disabled: boolean = false;
@Prop({ mutable: true }) value: string;
ionViewWillLoad() {