@galaxy-ds/core 1.1.75 → 1.1.76

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/dist/index.js CHANGED
@@ -33366,9 +33366,10 @@ var useStyles$y = makeStyles(function (theme) {
33366
33366
  });
33367
33367
  });
33368
33368
  var Autocomplete = function (_a) {
33369
- var label = _a.label, placeholder = _a.placeholder, _b = _a.platform, platform = _b === void 0 ? 'desktop' : _b, actionLabel = _a.actionLabel, actionClick = _a.actionClick, onChange = _a.onChange, bottomButtonHeight = _a.bottomButtonHeight, rest = __rest(_a, ["label", "placeholder", "platform", "actionLabel", "actionClick", "onChange", "bottomButtonHeight"]);
33369
+ var _b;
33370
+ var label = _a.label, placeholder = _a.placeholder, _c = _a.platform, platform = _c === void 0 ? 'desktop' : _c, actionLabel = _a.actionLabel, actionClick = _a.actionClick, onChange = _a.onChange, bottomButtonHeight = _a.bottomButtonHeight, textFieldReadOnly = _a.textFieldReadOnly, rest = __rest(_a, ["label", "placeholder", "platform", "actionLabel", "actionClick", "onChange", "bottomButtonHeight", "textFieldReadOnly"]);
33370
33371
  var classes = useStyles$y({ platform: platform, bottomButtonHeight: bottomButtonHeight });
33371
- var _c = React.useState(placeholder), inputPlaceholder = _c[0], setInputPlaceholder = _c[1];
33372
+ var _d = React.useState(!((_b = rest.defaultValue) === null || _b === void 0 ? void 0 : _b.length) ? placeholder : null), inputPlaceholder = _d[0], setInputPlaceholder = _d[1];
33372
33373
  var root = React.useRef(null);
33373
33374
  var onKeyDownHandler = function (event) {
33374
33375
  var inputRootEl = root.current.getElementsByClassName('MuiAutocomplete-inputRoot')[0];
@@ -33392,7 +33393,7 @@ var Autocomplete = function (_a) {
33392
33393
  };
33393
33394
  return (React__default["default"].createElement(React__default["default"].Fragment, null,
33394
33395
  label && React__default["default"].createElement(InputLabel, null, label),
33395
- React__default["default"].createElement(MuiAutocomplete, __assign$1({ classes: classes, disableClearable: true, renderInput: function (params) { return (React__default["default"].createElement(TextField$1, __assign$1({}, params, { inputProps: __assign$1(__assign$1({}, params.inputProps), { autoComplete: 'new-password' }), placeholder: inputPlaceholder, className: "customLargeSize" }))); }, PaperComponent: CustomPaper, onChange: function (event, value, reason) {
33396
+ React__default["default"].createElement(MuiAutocomplete, __assign$1({ classes: classes, disableClearable: true, renderInput: function (params) { return (React__default["default"].createElement(TextField$1, __assign$1({}, params, { inputProps: __assign$1(__assign$1({}, params.inputProps), { autoComplete: "new-password", readOnly: textFieldReadOnly }), placeholder: inputPlaceholder, className: "customLargeSize" }))); }, PaperComponent: CustomPaper, onChange: function (event, value, reason) {
33396
33397
  value && value.length > 0
33397
33398
  ? setInputPlaceholder(null)
33398
33399
  : setInputPlaceholder(placeholder);