Skip to content

Commit

Permalink
fix: use Prop instead of State to fix form bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbert committed Aug 15, 2021
1 parent e3450da commit 5ce11d7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions components/checkbox/stencil.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Copyright (c) 2021 Robbert Broersma
*/

import { Component, Event, EventEmitter, Prop, State, h } from "@stencil/core";
import { Component, Event, EventEmitter, Prop, h } from "@stencil/core";
import clsx from "clsx";

@Component({
Expand All @@ -14,8 +14,8 @@ import clsx from "clsx";
export class Checkbox {
@Prop({ reflect: true }) disabled: boolean = false;
@Prop({ attribute: "readonly", reflect: true }) readOnly: boolean = false;
@State() checked: boolean = false;
@State() value: string = "";
@Prop() checked: boolean = false;
@Prop() value: string = "";
@Event() utrechtBlur: EventEmitter;
@Event() utrechtChange: EventEmitter;
@Event() utrechtFocus: EventEmitter;
Expand Down
4 changes: 2 additions & 2 deletions components/form-field-textbox/stencil.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Copyright (c) 2021 Robbert Broersma
*/

import { Component, Event, EventEmitter, Prop, State, h } from "@stencil/core";
import { Component, Event, EventEmitter, Prop, h } from "@stencil/core";
import clsx from "clsx";

@Component({
Expand All @@ -16,7 +16,7 @@ export class FormFieldTextbox {
@Prop({ reflect: true }) invalid: boolean = false;
@Prop({ attribute: "readonly", reflect: true }) readOnly: boolean = false;
@Prop() placeholder: string = "";
@State() value: string = "";
@Prop() value: string = "";
@Event() utrechtBlur: EventEmitter;
@Event() utrechtChange: EventEmitter;
@Event() utrechtFocus: EventEmitter;
Expand Down
4 changes: 2 additions & 2 deletions components/textbox/stencil.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Copyright (c) 2021 Robbert Broersma
*/

import { Component, Event, EventEmitter, Prop, State, h } from "@stencil/core";
import { Component, Event, EventEmitter, Prop, h } from "@stencil/core";
import clsx from "clsx";

@Component({
Expand All @@ -16,7 +16,7 @@ export class Textbox {
@Prop({ reflect: true }) invalid: boolean = false;
@Prop({ attribute: "readonly", reflect: true }) readOnly: boolean = false;
@Prop() placeholder: string = "";
@State() value: string = "";
@Prop() value: string = "";
@Event() utrechtBlur: EventEmitter;
@Event() utrechtChange: EventEmitter;
@Event() utrechtFocus: EventEmitter;
Expand Down

0 comments on commit 5ce11d7

Please sign in to comment.