Skip to content

Commit

Permalink
fix(forms): rename variables
Browse files Browse the repository at this point in the history
  • Loading branch information
dtsanevmw committed Dec 9, 2023
1 parent 8903e72 commit e149a5b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion projects/angular/clarity.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export class CdsIconCustomTag {
}

// @public (undocumented)
export enum CHANGES_KEYS {
export enum CHANGE_KEYS {
// (undocumented)
FORM = "form",
// (undocumented)
Expand Down
6 changes: 3 additions & 3 deletions projects/angular/src/forms/common/wrapped-control.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,17 +219,17 @@ class WithDynamicFormControl {
<form-wrapper>
<test-wrapper3>
<label> Label </label>
<textarea testControl3 [(ngModel)]="object['control']"></textarea>
<textarea testControl3 [(ngModel)]="form['control']"></textarea>
<clr-control-success>Successful!</clr-control-success>
</test-wrapper3>
<form-wrapper> </form-wrapper
></form-wrapper>
`,
})
class WithDynamicNgControl {
object = {};
form = {};
addControl() {
this.object['control'] = 'TEST';
this.form['control'] = 'TEST';
}
}

Expand Down
4 changes: 2 additions & 2 deletions projects/angular/src/forms/common/wrapped-control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import { ControlIdService } from './providers/control-id.service';
import { MarkControlService } from './providers/mark-control.service';
import { Helpers, NgControlService } from './providers/ng-control.service';

export enum CHANGES_KEYS {
export enum CHANGE_KEYS {
FORM = 'form',
MODEL = 'model',
}
Expand Down Expand Up @@ -121,7 +121,7 @@ export class WrappedFormControl<W extends DynamicWrapper> implements OnInit, OnD
if (changes) {
changes.forEachChangedItem(change => {
if (
(change.key === CHANGES_KEYS.FORM || change.key === CHANGES_KEYS.MODEL) &&
(change.key === CHANGE_KEYS.FORM || change.key === CHANGE_KEYS.MODEL) &&
change.currentValue !== change.previousValue
) {
this.triggerValidation();
Expand Down

0 comments on commit e149a5b

Please sign in to comment.