@trackunit/react-components 0.0.125 → 0.0.126

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.
@@ -132,6 +132,6 @@ export interface SelectProps<Option, IsAsync extends boolean, IsMulti extends bo
132
132
  * @returns {JSX.Element} Select component
133
133
  */
134
134
  export declare const Select: {
135
- <Option, IsAsync extends boolean = false, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>({ id, className, dataTestId, prefix, async, dropdownIcon, maxMenuHeight, label, hasError, disabled, isMulti, components, value, options, onChange, isLoading, classNamePrefix, onMenuOpen, onMenuClose, maxSelectedDisplayCount, isClearable, isSearchable, onMenuScrollToBottom, styles, filterOption, onInputChange, }: SelectProps<Option, IsAsync, IsMulti, Group>): JSX.Element;
135
+ <Option, IsAsync extends boolean = false, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>({ id, className, dataTestId, prefix, async, dropdownIcon, maxMenuHeight, label, hasError, disabled, isMulti, components, value, options, onChange, isLoading, classNamePrefix, onMenuOpen, onMenuClose, maxSelectedDisplayCount, isClearable, isSearchable, onMenuScrollToBottom, styles, filterOption, onInputChange, ...props }: SelectProps<Option, IsAsync, IsMulti, Group>): JSX.Element;
136
136
  displayName: string;
137
137
  };
package/index.js CHANGED
@@ -4209,40 +4209,45 @@ const CreatableSelect = _a => {
4209
4209
  * @returns {JSX.Element} Select component
4210
4210
  */
4211
4211
 
4212
- const Select = ({
4213
- id,
4214
- className,
4215
- dataTestId = "select",
4216
- prefix,
4217
- async,
4218
- dropdownIcon,
4219
- maxMenuHeight = 200,
4220
- label,
4221
- hasError,
4222
- disabled,
4223
- isMulti,
4224
- components,
4225
- value,
4226
- options,
4227
- onChange,
4228
- isLoading,
4229
- classNamePrefix = "",
4230
- onMenuOpen,
4231
- onMenuClose,
4232
- maxSelectedDisplayCount = undefined,
4233
- isClearable = false,
4234
- isSearchable = true,
4235
- onMenuScrollToBottom,
4236
- styles,
4237
- filterOption,
4238
- onInputChange
4239
- }) => {
4212
+ const Select = _a => {
4213
+ var _b;
4214
+
4215
+ var {
4216
+ id,
4217
+ className,
4218
+ dataTestId = "select",
4219
+ prefix,
4220
+ async,
4221
+ dropdownIcon,
4222
+ maxMenuHeight = 200,
4223
+ label,
4224
+ hasError,
4225
+ disabled,
4226
+ isMulti,
4227
+ components,
4228
+ value,
4229
+ options,
4230
+ onChange,
4231
+ isLoading,
4232
+ classNamePrefix = "",
4233
+ onMenuOpen,
4234
+ onMenuClose,
4235
+ maxSelectedDisplayCount = undefined,
4236
+ isClearable = false,
4237
+ isSearchable = true,
4238
+ onMenuScrollToBottom,
4239
+ styles,
4240
+ filterOption,
4241
+ onInputChange
4242
+ } = _a,
4243
+ props = __rest(_a, ["id", "className", "dataTestId", "prefix", "async", "dropdownIcon", "maxMenuHeight", "label", "hasError", "disabled", "isMulti", "components", "value", "options", "onChange", "isLoading", "classNamePrefix", "onMenuOpen", "onMenuClose", "maxSelectedDisplayCount", "isClearable", "isSearchable", "onMenuScrollToBottom", "styles", "filterOption", "onInputChange"]);
4244
+
4240
4245
  const refContainer = React.useRef(null);
4241
4246
  const refPrefix = React.useRef(null);
4242
4247
  const {
4243
4248
  customStyles
4244
4249
  } = useCustomStyles(refContainer, refPrefix, maxSelectedDisplayCount, styles);
4245
- const [menuIsOpen, setMenuIsOpen] = React.useState(false);
4250
+ const [menuIsOpen, setMenuIsOpen] = React.useState((_b = props.menuIsOpen) !== null && _b !== void 0 ? _b : false);
4246
4251
  const [menuIsClosing, setMenuIsClosing] = React.useState(true);
4247
4252
  const refMenuIsEnabled = React.useRef(true);
4248
4253
  const customComponents = useCustomComponents(components, disabled || false, menuIsClosing, refMenuIsEnabled, dataTestId, maxSelectedDisplayCount, dropdownIcon);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-components",
3
- "version": "0.0.125",
3
+ "version": "0.0.126",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "dependencies": {