@homecode/ui 4.18.34 → 4.18.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -400,9 +400,12 @@ class Select extends Component {
|
|
|
400
400
|
return label;
|
|
401
401
|
}
|
|
402
402
|
getFieldLabel(label) {
|
|
403
|
+
const { showSelectedCount, disableLable, value } = this.props;
|
|
404
|
+
if (disableLable)
|
|
405
|
+
return null;
|
|
403
406
|
// @ts-ignore
|
|
404
|
-
const length =
|
|
405
|
-
if (this.isMultiple() && length)
|
|
407
|
+
const length = value?.length;
|
|
408
|
+
if (this.isMultiple() && length && showSelectedCount)
|
|
406
409
|
return `${label} (${length})`;
|
|
407
410
|
return label;
|
|
408
411
|
}
|
|
@@ -35,6 +35,8 @@ export type Props = FormControl<Value> & InheritedInputProps & {
|
|
|
35
35
|
additionalLabel?: ReactNode;
|
|
36
36
|
size?: Size;
|
|
37
37
|
variant?: 'default' | 'outlined';
|
|
38
|
+
showSelectedCount?: boolean;
|
|
39
|
+
disableLable?: boolean;
|
|
38
40
|
blur?: boolean;
|
|
39
41
|
options: Option[];
|
|
40
42
|
additionalOptions?: Option[];
|