@db-ux/react-core-components 4.3.1 → 4.3.2-consolidation-7549d9f

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.
@@ -296,6 +296,14 @@ function DBCustomSelectFn(props, component) {
296
296
  activeElement.click();
297
297
  event.preventDefault();
298
298
  }
299
+ else if (activeElement.getAttribute("type") === "search") {
300
+ // When Enter is pressed in search field, select the first available option
301
+ const firstOption = _options === null || _options === void 0 ? void 0 : _options.find((opt) => !opt.isGroupTitle && !opt.disabled);
302
+ if (firstOption === null || firstOption === void 0 ? void 0 : firstOption.value) {
303
+ handleSelect(firstOption.value);
304
+ event.preventDefault();
305
+ }
306
+ }
299
307
  }
300
308
  }
301
309
  else if (event.key === "ArrowDown" ||
@@ -43,7 +43,7 @@ function DBDrawerFn(props, component) {
43
43
  const open = Boolean(props.open);
44
44
  if (open && !_ref.current.open) {
45
45
  if (dialogContainerRef.current) {
46
- dialogContainerRef.current.hidden = false;
46
+ dialogContainerRef.current.removeAttribute("data-transition");
47
47
  }
48
48
  if (props.position === "absolute" ||
49
49
  props.backdrop === "none" ||
@@ -53,16 +53,19 @@ function DBDrawerFn(props, component) {
53
53
  else {
54
54
  _ref.current.showModal();
55
55
  }
56
+ void delay(() => {
57
+ if (dialogContainerRef.current) {
58
+ dialogContainerRef.current.dataset["transition"] = "open";
59
+ }
60
+ }, 1);
56
61
  }
57
62
  if (!open && _ref.current.open) {
58
63
  if (dialogContainerRef.current) {
59
- dialogContainerRef.current.hidden = true;
64
+ dialogContainerRef.current.dataset["transition"] =
65
+ "close";
60
66
  }
61
- delay(() => {
67
+ void delay(() => {
62
68
  var _a;
63
- if (dialogContainerRef.current) {
64
- dialogContainerRef.current.hidden = false;
65
- }
66
69
  (_a = _ref.current) === null || _a === void 0 ? void 0 : _a.close();
67
70
  }, 401);
68
71
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@db-ux/react-core-components",
3
- "version": "4.3.1",
3
+ "version": "4.3.2-consolidation-7549d9f",
4
4
  "description": "React components for @db-ux/core-components",
5
5
  "repository": {
6
6
  "type": "git",
@@ -41,7 +41,7 @@
41
41
  },
42
42
  "sideEffects": false,
43
43
  "dependencies": {
44
- "@db-ux/core-components": "4.3.1",
45
- "@db-ux/core-foundations": "4.3.1"
44
+ "@db-ux/core-components": "4.3.2-consolidation-7549d9f",
45
+ "@db-ux/core-foundations": "4.3.2-consolidation-7549d9f"
46
46
  }
47
47
  }