File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
src/packages/property-editors/content-picker Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -43,9 +43,15 @@ export class UmbPropertyEditorUIContentPickerElement
43
43
@state ( )
44
44
_min = 0 ;
45
45
46
+ @state ( )
47
+ _minMessage = '' ;
48
+
46
49
@state ( )
47
50
_max = Infinity ;
48
51
52
+ @state ( )
53
+ _maxMessage = '' ;
54
+
49
55
@state ( )
50
56
_allowedContentTypeUniques ?: string | null ;
51
57
@@ -83,6 +89,14 @@ export class UmbPropertyEditorUIContentPickerElement
83
89
84
90
this . _allowedContentTypeUniques = config . getValueByAlias ( 'filter' ) ;
85
91
this . _showOpenButton = config . getValueByAlias ( 'showOpenButton' ) ;
92
+
93
+ this . _minMessage = `${ this . localize . term ( 'validation_minCount' ) } ${ this . _min } ${ this . localize . term ( 'validation_items' ) } ` ;
94
+ this . _maxMessage = `${ this . localize . term ( 'validation_maxCount' ) } ${ this . _max } ${ this . localize . term ( 'validation_itemsSelected' ) } ` ;
95
+
96
+ // NOTE: Run validation immediately, to notify if the value is outside of min/max range. [LK]
97
+ if ( this . _min > 0 || this . _max < Infinity ) {
98
+ this . checkValidity ( ) ;
99
+ }
86
100
}
87
101
88
102
#parseInt( value : unknown , fallback : number ) : number {
You can’t perform that action at this time.
0 commit comments