@wavelengthusaf/components 4.1.1 → 4.1.2

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.
@@ -7790,12 +7790,13 @@ var WavelengthAutoComplete = ({
7790
7790
  labelColor,
7791
7791
  focusedLabelColor,
7792
7792
  id,
7793
- name
7793
+ name,
7794
+ placeholder
7794
7795
  }) => {
7795
7796
  const inputRef = _react.useRef.call(void 0, null);
7796
7797
  const listRef = _react.useRef.call(void 0, null);
7797
7798
  const noItemListRef = _react.useRef.call(void 0, null);
7798
- const [inputValue, setInputValue] = _react.useState.call(void 0, "");
7799
+ const [inputValue, setInputValue] = _react.useState.call(void 0, _nullishCoalesce(placeholder, () => ( data[0])));
7799
7800
  const [suggestions, setSuggestions] = _react.useState.call(void 0, []);
7800
7801
  const [isDropdownVisible, setIsDropdownVisible] = _react.useState.call(void 0, false);
7801
7802
  const suggestHasItems = suggestions.length > 0;
@@ -845,9 +845,10 @@ interface AutocompleteProps {
845
845
  focusedLabelColor?: string;
846
846
  id?: string;
847
847
  name?: string;
848
+ placeholder?: string;
848
849
  }
849
850
  declare const WavelengthAutoComplete: {
850
- ({ floatLabel, data, height, width, inputBorderStyle, inputFocusBorderColor, onDataChange, autoBackGroundColor, labelColor, focusedLabelColor, id, name, }: AutocompleteProps): react_jsx_runtime.JSX.Element;
851
+ ({ floatLabel, data, height, width, inputBorderStyle, inputFocusBorderColor, onDataChange, autoBackGroundColor, labelColor, focusedLabelColor, id, name, placeholder, }: AutocompleteProps): react_jsx_runtime.JSX.Element;
851
852
  displayName: string;
852
853
  };
853
854
 
@@ -845,9 +845,10 @@ interface AutocompleteProps {
845
845
  focusedLabelColor?: string;
846
846
  id?: string;
847
847
  name?: string;
848
+ placeholder?: string;
848
849
  }
849
850
  declare const WavelengthAutoComplete: {
850
- ({ floatLabel, data, height, width, inputBorderStyle, inputFocusBorderColor, onDataChange, autoBackGroundColor, labelColor, focusedLabelColor, id, name, }: AutocompleteProps): react_jsx_runtime.JSX.Element;
851
+ ({ floatLabel, data, height, width, inputBorderStyle, inputFocusBorderColor, onDataChange, autoBackGroundColor, labelColor, focusedLabelColor, id, name, placeholder, }: AutocompleteProps): react_jsx_runtime.JSX.Element;
851
852
  displayName: string;
852
853
  };
853
854
 
package/dist/esm/index.js CHANGED
@@ -7790,12 +7790,13 @@ var WavelengthAutoComplete = ({
7790
7790
  labelColor,
7791
7791
  focusedLabelColor,
7792
7792
  id,
7793
- name
7793
+ name,
7794
+ placeholder
7794
7795
  }) => {
7795
7796
  const inputRef = useRef11(null);
7796
7797
  const listRef = useRef11(null);
7797
7798
  const noItemListRef = useRef11(null);
7798
- const [inputValue, setInputValue] = useState12("");
7799
+ const [inputValue, setInputValue] = useState12(placeholder ?? data[0]);
7799
7800
  const [suggestions, setSuggestions] = useState12([]);
7800
7801
  const [isDropdownVisible, setIsDropdownVisible] = useState12(false);
7801
7802
  const suggestHasItems = suggestions.length > 0;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@wavelengthusaf/components",
3
3
  "author": "563 EWS - Wavelength",
4
4
  "license": "MIT",
5
- "version": "4.1.1",
5
+ "version": "4.1.2",
6
6
  "description": "Common component library used by Wavelength developers",
7
7
  "main": "/dist/cjs/index.cjs",
8
8
  "module": "/dist/esm/index.js",