@gm-pc/keyboard 1.13.3-alpha.1 → 1.14.0-alpha.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gm-pc/keyboard",
3
- "version": "1.13.3-alpha.1",
3
+ "version": "1.14.0-alpha.0",
4
4
  "description": "",
5
5
  "author": "liyatang <liyatang@qq.com>",
6
6
  "homepage": "https://github.com/gmfe/gm-pc#readme",
@@ -27,10 +27,10 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@gm-common/tool": "^2.10.0",
30
- "@gm-pc/react": "^1.13.3-alpha.1",
31
- "@gm-pc/table-x": "^1.13.3-alpha.1",
30
+ "@gm-pc/react": "^1.14.0-alpha.0",
31
+ "@gm-pc/table-x": "^1.14.0-alpha.0",
32
32
  "classnames": "^2.2.5",
33
33
  "lodash": "^4.17.19"
34
34
  },
35
- "gitHead": "4605da606ef3651da81968ad6802fae8806a10d6"
35
+ "gitHead": "68355f8611699df931fb04ab0fbfc5501d6392ae"
36
36
  }
package/src/core/wrap.tsx CHANGED
@@ -96,6 +96,8 @@ const Wrap: FC<WrapProps> = ({
96
96
  columnKeys[0],
97
97
  cellKey
98
98
  )
99
+ const table = document.querySelector('.gm-table-x')
100
+ if (table) table.scrollLeft = 0
99
101
  }, 10)
100
102
  }
101
103
  }
@@ -42,7 +42,7 @@ function scrollIntoViewFixedWidth(
42
42
  export default scrollIntoViewFixedWidth
43
43
 
44
44
  function getTd(dom: HTMLElement) {
45
- let parentNode = dom.parentNode as HTMLElement
45
+ let parentNode = dom?.parentNode as HTMLElement
46
46
  while (
47
47
  !(
48
48
  parentNode.classList.contains('rt-td') ||
@@ -57,7 +57,7 @@ function getTd(dom: HTMLElement) {
57
57
  }
58
58
 
59
59
  function getTable(dom: HTMLElement) {
60
- let parentNode = dom.parentNode as HTMLElement
60
+ let parentNode = dom?.parentNode as HTMLElement
61
61
  while (
62
62
  !(
63
63
  parentNode.classList.contains('gm-table-x') ||