@alaarab/ogrid-vue 2.4.1 → 2.4.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.
Files changed (2) hide show
  1. package/dist/esm/index.js +15 -0
  2. package/package.json +2 -2
package/dist/esm/index.js CHANGED
@@ -4552,17 +4552,32 @@ function createInlineCellEditor(options) {
4552
4552
  dropdown.style.top = `${rect.bottom}px`;
4553
4553
  }
4554
4554
  };
4555
+ let scrollCleanup = null;
4555
4556
  onMounted(() => {
4556
4557
  nextTick(() => {
4557
4558
  if (selectWrapperRef.value) {
4558
4559
  selectWrapperRef.value.focus();
4559
4560
  positionDropdown();
4561
+ const wrapper = selectWrapperRef.value;
4562
+ const scrollParent = wrapper.closest(".ogrid-table-wrapper") ?? wrapper.closest('[style*="overflow"]');
4563
+ const handleScroll = () => {
4564
+ if (props.onCancel) props.onCancel();
4565
+ };
4566
+ if (scrollParent) scrollParent.addEventListener("scroll", handleScroll, { passive: true });
4567
+ window.addEventListener("scroll", handleScroll, { passive: true });
4568
+ scrollCleanup = () => {
4569
+ if (scrollParent) scrollParent.removeEventListener("scroll", handleScroll);
4570
+ window.removeEventListener("scroll", handleScroll);
4571
+ };
4560
4572
  return;
4561
4573
  }
4562
4574
  inputRef.value?.focus();
4563
4575
  inputRef.value?.select();
4564
4576
  });
4565
4577
  });
4578
+ onUnmounted(() => {
4579
+ scrollCleanup?.();
4580
+ });
4566
4581
  watch(() => props.value, (v) => {
4567
4582
  localValue.value = v;
4568
4583
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alaarab/ogrid-vue",
3
- "version": "2.4.1",
3
+ "version": "2.4.2",
4
4
  "description": "OGrid Vue – Vue 3 composables, headless components, and utilities for OGrid data grids.",
5
5
  "main": "dist/esm/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -36,7 +36,7 @@
36
36
  "node": ">=18"
37
37
  },
38
38
  "dependencies": {
39
- "@alaarab/ogrid-core": "2.4.1"
39
+ "@alaarab/ogrid-core": "2.4.2"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "vue": "^3.3.0"