You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ngx-numeric-range-form-field/README.md
+8-3
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# ngx-numeric-range-form-field
2
2
3
-
An Angular Material UI numeric range input form field. It is based on custom form field control and control value accessor which allows inserting minimum number and maximum number of some range.
3
+
An Angular Material UI numeric range input form field. It is based on custom form field control and control value accessor which allows inserting range numbers, minimum and maximum.
4
4
5
5

6
6
@@ -48,7 +48,10 @@ form: FormGroup;
48
48
49
49
constructor() {
50
50
this.form=newFormGroup({
51
-
range: newFormControl(null, [
51
+
range: newFormControl({
52
+
minimum: 10,
53
+
maximum: 100,
54
+
}, [
52
55
Validators.required, //optional
53
56
Validators.min(10), //optional
54
57
Validators.max(100), //optional
@@ -82,6 +85,8 @@ Customizable input and output decorators:
82
85
@Input() minPlaceholder='From'; // Placeholder of the minimum value control
83
86
@Input() maxPlaceholder='To'; // Placeholder of the maximum value control
84
87
@Input() readonly=false; // Indicator wether the both controls are readonly
88
+
@Input() minReadonly=false; // Indicator wether the minimum control is readonly
89
+
@Input() maxReadonly=false; // Indicator wether the maximum control is readonly
85
90
@Input() resettable=true; // Indicator wether the both controls are resettable
Copy file name to clipboardExpand all lines: ngx-numeric-range-form-field/projects/ngx-numeric-range-form-field/README.md
+8-3
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# ngx-numeric-range-form-field
2
2
3
-
An Angular Material UI numeric range input form field. It is based on custom form field control and control value accessor which allows inserting minimum number and maximum number of some range.
3
+
An Angular Material UI numeric range input form field. It is based on custom form field control and control value accessor which allows inserting range numbers, minimum and maximum.
4
4
5
5

6
6
@@ -48,7 +48,10 @@ form: FormGroup;
48
48
49
49
constructor() {
50
50
this.form=newFormGroup({
51
-
range: newFormControl(null, [
51
+
range: newFormControl({
52
+
minimum: 10,
53
+
maximum: 100,
54
+
}, [
52
55
Validators.required, //optional
53
56
Validators.min(10), //optional
54
57
Validators.max(100), //optional
@@ -82,6 +85,8 @@ Customizable input and output decorators:
82
85
@Input() minPlaceholder='From'; // Placeholder of the minimum value control
83
86
@Input() maxPlaceholder='To'; // Placeholder of the maximum value control
84
87
@Input() readonly=false; // Indicator wether the both controls are readonly
88
+
@Input() minReadonly=false; // Indicator wether the minimum control is readonly
89
+
@Input() maxReadonly=false; // Indicator wether the maximum control is readonly
85
90
@Input() resettable=true; // Indicator wether the both controls are resettable
Copy file name to clipboardExpand all lines: ngx-numeric-range-form-field/projects/ngx-numeric-range-form-field/src/lib/container/numeric-range-form-field-container.component.html
Copy file name to clipboardExpand all lines: ngx-numeric-range-form-field/projects/ngx-numeric-range-form-field/src/lib/container/numeric-range-form-field-container.component.ts
this.controlDirective.control.setValidators([this.validate.bind(this)]);// overrides the parent control validators by sending out errors from validate()
Copy file name to clipboardExpand all lines: ngx-numeric-range-form-field/projects/ngx-numeric-range-form-field/src/lib/control/numeric-range-form-field-control.component.html
Copy file name to clipboardExpand all lines: ngx-numeric-range-form-field/projects/ngx-numeric-range-form-field/src/lib/control/numeric-range-form-field-control.component.scss
Copy file name to clipboardExpand all lines: ngx-numeric-range-form-field/projects/ngx-numeric-range-form-field/src/lib/control/numeric-range-form-field-control.component.ts
+3-1
Original file line number
Diff line number
Diff line change
@@ -74,6 +74,8 @@ export class NumericRangeFormFieldControlComponent
74
74
@Input()minPlaceholder: string;
75
75
@Input()maxPlaceholder: string;
76
76
@Input()readonly=false;
77
+
@Input()minReadonly=false;
78
+
@Input()maxReadonly=false;
77
79
@Input()required: boolean;
78
80
@Input()disabled: boolean;
79
81
@Input()errorStateMatcher: ErrorStateMatcher;
@@ -140,7 +142,7 @@ export class NumericRangeFormFieldControlComponent
0 commit comments