@servicetitan/anvil2 1.49.1 → 1.49.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @servicetitan/anvil2
2
2
 
3
+ ## 1.49.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1693](https://github.com/servicetitan/hammer/pull/1693) [`743b27d`](https://github.com/servicetitan/hammer/commit/743b27d9c101fada7c2cc296884f05af15f4e81c) Thanks [@pbuckingham-st](https://github.com/pbuckingham-st)! - [Combobox] AddNew functionality fixed for single select mode
8
+
3
9
  ## 1.49.1
4
10
 
5
11
  ### Patch Changes
@@ -9327,7 +9327,7 @@ const CoreComboboxItemElement = function({
9327
9327
  children,
9328
9328
  disabled: disabledProp,
9329
9329
  item,
9330
- index: _indexProp,
9330
+ index: indexProp,
9331
9331
  hideCheckbox,
9332
9332
  forceCloseOnSelect,
9333
9333
  forceClearInputValueOnSelect,
@@ -9355,7 +9355,7 @@ const CoreComboboxItemElement = function({
9355
9355
  highlightedIndex,
9356
9356
  items
9357
9357
  } = useCombobox$1();
9358
- const index = items.indexOf(item);
9358
+ const index = item === ADD_NEW$1 && !multiple ? indexProp : items.indexOf(item);
9359
9359
  const disabled = disabledProp || item && item instanceof Object && "disabled" in item && item.disabled;
9360
9360
  useEffect(() => {
9361
9361
  if (disabledProp && !disabledItems.includes(item)) {
@@ -10534,4 +10534,4 @@ const Combobox = Object.assign(ComboboxElement, {
10534
10534
  });
10535
10535
 
10536
10536
  export { Combobox as C, ComboboxElement as a, ComboboxSelect as b, ComboboxContent as c, ComboboxList as d, ComboboxItem as e, ComboboxItemAddNew as f, ComboboxSearchField as g, ComboboxSelectTrigger as h, ComboboxEmpty as i };
10537
- //# sourceMappingURL=Combobox-C4COM7BZ.js.map
10537
+ //# sourceMappingURL=Combobox-RjBDpgFV.js.map