@dvrd/dvr-controls 1.0.70 → 1.0.71

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dvrd/dvr-controls",
3
- "version": "1.0.70",
3
+ "version": "1.0.71",
4
4
  "description": "Custom web controls",
5
5
  "main": "index.ts",
6
6
  "files": [
@@ -29,20 +29,16 @@ interface Props {
29
29
  selectOnly: boolean;
30
30
  searchValue: string;
31
31
  optionsContainerHeight: number | string;
32
+ placeholder?: string;
32
33
  }
33
34
 
34
- // interface State {
35
- // open: boolean;
36
- // searchFocused: boolean;
37
- // }
38
-
39
35
  const transitionDuration = 200; // ms
40
36
 
41
37
  export default function DvrdMultiSelect(props: Props) {
42
38
  const {
43
39
  error, disabled, selected, onChange, onChangeSearch, items, optionsContainerHeight, label, labelClassName,
44
40
  selectOnly, valueClassName, searchValue, arrowClassName, itemClassName, itemsPosition, itemContainerClassName,
45
- errorClassName, className
41
+ errorClassName, className, placeholder
46
42
  } = props;
47
43
  const [open, setOpen] = useState(false);
48
44
  const [searchFocused, setSearchFocused] = useState(false);
@@ -100,7 +96,7 @@ export default function DvrdMultiSelect(props: Props) {
100
96
  else valueLabel = getItemLabel(item);
101
97
  }
102
98
  }
103
- if (!valueLabel.length) return '';
99
+ if (!valueLabel.length) return placeholder ?? '';
104
100
  if (extra) valueLabel += ` +${extra}`
105
101
  return valueLabel;
106
102
  }
@@ -29,6 +29,7 @@ interface Props {
29
29
  optionsContainerHeight?: number | string;
30
30
  unControlled?: true;
31
31
  multi?: true;
32
+ placeholder?: string;
32
33
  }
33
34
 
34
35
  // interface State {