Skip to content

Commit 0403ddf

Browse files
author
esuau
committed
#176 Move @input decorators to setters
1 parent dad486a commit 0403ddf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/checkbox/checkbox.component.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,14 @@ export class Checkbox implements ControlValueAccessor, AfterViewInit {
137137
* Reflects whether the checkbox state is indeterminate.
138138
* @readonly
139139
*/
140-
@Input() get indeterminate() {
140+
get indeterminate() {
141141
return this._indeterminate;
142142
}
143143

144144
/**
145145
* Set the checkbox's indeterminate state to match the parameter and transition the view to reflect the change.
146146
*/
147-
set indeterminate(indeterminate: boolean) {
147+
@Input() set indeterminate(indeterminate: boolean) {
148148
let changed = this._indeterminate !== indeterminate;
149149
this._indeterminate = indeterminate;
150150

@@ -161,14 +161,14 @@ export class Checkbox implements ControlValueAccessor, AfterViewInit {
161161
* Returns value `true` if state is selected for the checkbox.
162162
* @readonly
163163
*/
164-
@Input() get checked() {
164+
get checked() {
165165
return this._checked;
166166
}
167167

168168
/**
169169
* Updating the state of a checkbox to match the state of the parameter passed in.
170170
*/
171-
set checked (checked: boolean) {
171+
@Input() set checked (checked: boolean) {
172172
if (checked !== this.checked) {
173173
if (this._indeterminate) {
174174
Promise.resolve().then(() => {

0 commit comments

Comments
 (0)