@symply.io/basic-components 1.6.10-alpha.2 → 1.6.10-alpha.4

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.
@@ -43,16 +43,16 @@ function MultipleSelector(props) {
43
43
  }, inputProps: {
44
44
  onFocus: onOpenTooltip,
45
45
  onBlur: onCloseTooltip,
46
- }, placeholder: placeholder, label: label, renderValue: multiple
46
+ }, label: label, renderValue: multiple
47
47
  ? function (selectedValues) {
48
- return options
48
+ return selectedValues.length > 0 ? (options
49
49
  .filter(function (opt) {
50
50
  return selectedValues
51
51
  .map(function (v) { return String(v); })
52
52
  .includes(String(opt.value));
53
53
  })
54
54
  .map(function (opt) { return opt.label; })
55
- .join("; ");
55
+ .join("; ")) : placeholder ? (_jsx("em", { children: placeholder })) : undefined;
56
56
  }
57
57
  : undefined }, { children: (options === null || options === void 0 ? void 0 : options.length) > 0 ? (options.map(function (option) {
58
58
  var label = option.label, v = option.value;
@@ -41,7 +41,14 @@ function SimpleSelector(props) {
41
41
  }, inputProps: {
42
42
  onFocus: onOpenTooltip,
43
43
  onBlur: onCloseTooltip,
44
- }, placeholder: placeholder, label: label }, { children: (options === null || options === void 0 ? void 0 : options.length) > 0 ? (options.map(function (option) {
44
+ }, renderValue: function (selectedValue) {
45
+ if (placeholder) {
46
+ return selectedValue !== null && selectedValue !== undefined ? (selectedValue) : (_jsx("em", { children: placeholder }));
47
+ }
48
+ else {
49
+ return selectedValue;
50
+ }
51
+ }, label: label }, { children: (options === null || options === void 0 ? void 0 : options.length) > 0 ? (options.map(function (option) {
45
52
  var label = option.label, v = option.value, disabled = option.disabled;
46
53
  return (_jsx(MenuItem, __assign({ value: v, disabled: disabled }, { children: label }), v));
47
54
  })) : (_jsx(MenuItem, __assign({ value: "", disabled: true }, { children: "No Options" }))) })), !!helperText && showHelperText && (_jsx(FormHelperText, { children: showHelperText }))] })) })) })));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@symply.io/basic-components",
3
- "version": "1.6.10-alpha.2",
3
+ "version": "1.6.10-alpha.4",
4
4
  "description": "Basic and reusable components for all frontend of Symply apps",
5
5
  "keywords": [
6
6
  "react",