-
Notifications
You must be signed in to change notification settings - Fork 357
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(dynamic-forms): allow elements to be disabled via configuration (#…
…1219) * refactor(dynamic-forms): remove ngModel usage this is needed because we were mixing reactive forms with template driven forms and this usage will be deprecated in angular 7 also used the covalent control value accessor mixin * chore(): remove AbstractControlValueAccessor code since its not needed * fix(): form support was not needed in the dynamic elements since we are injecting the control instance into the underlying element form support was never needed * feat(dynamic-forms): allow elements to be disabled via configuration adding a disabled property to disable properties on the fly without the need of accessing the underlying form * fix(): disable input in dynamic file input * fix(): fix label scss for slider
- Loading branch information
1 parent
95c773d
commit 2e2b8a0
Showing
11 changed files
with
104 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 12 additions & 8 deletions
20
src/platform/dynamic-forms/dynamic-elements/dynamic-slider/dynamic-slider.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,21 @@ | ||
<div class="td-dynamic-slider-wrapper"> | ||
<div class="mat-form-field-placeholder-wrapper mat-form-field-can-float mat-form-field-should-float" | ||
[class.mat-focused]="slider._isActive"> | ||
<label class="mat-form-field-placeholder mat-float mat-form-field-float td-slider-label"> {{label}} <span *ngIf="required" class="mat-placeholder-required">*</span></label> | ||
</div> | ||
<div class="td-dynamic-slider-wrapper mat-form-field mat-form-field-can-float mat-form-field-should-float" | ||
[class.mat-focused]="slider._isActive"> | ||
<span class="mat-form-field-label-wrapper"> | ||
<label class="mat-form-field-label mat-primary td-slider-label"> | ||
{{label}} | ||
<span *ngIf="required && !control?.disabled" class="mat-form-field-required-marker">*</span> | ||
</label> | ||
</span> | ||
<div class="td-dynamic-slider-field"> | ||
<mat-slider #slider | ||
class="td-dynamic-slider" | ||
[formControl]="control" | ||
class="td-dynamic-slider" | ||
[formControl]="control" | ||
[min]="min" | ||
[max]="max" | ||
thumbLabel | ||
tickInterval="auto" | ||
[required]="required"> | ||
[required]="required" | ||
(blur)="_handleBlur()"> | ||
</mat-slider> | ||
</div> | ||
</div> |
6 changes: 5 additions & 1 deletion
6
src/platform/dynamic-forms/dynamic-elements/dynamic-slider/dynamic-slider.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters