Compare commits

...

3 Commits

Author SHA1 Message Date
b7d0c0bd62 chore: 🔧 release x6-react-shape@1.6.6 2024-08-15 13:59:13 +08:00
753bc29dcc fix: react-shape this.selectors must valid (#4374)
Co-authored-by: 魄兵 <pobing.slb@alibaba-inc.com>
2024-08-14 09:54:49 +08:00
9f200a272d chore: 🔧 change publish script 2023-11-14 10:28:35 +08:00
3 changed files with 10 additions and 8 deletions

View File

@ -27,7 +27,7 @@
"package:inherit": "yarn package-inherit update",
"prepare": "is-ci || husky install configs/husky-config",
"precommit": "yarn lint-staged && lerna run --concurrency 1 --stream precommit",
"publish:latest": "yarn build:dev && lerna publish --no-private --ignore-scripts"
"publish:latest": "lerna publish from-package --no-private --ignore-scripts --dist-tag v1"
},
"lint-staged": {
"**/*.{js,jsx,tsx,ts,less,md,json}": [

View File

@ -1,6 +1,6 @@
{
"name": "@antv/x6-react-shape",
"version": "1.6.5",
"version": "1.6.6",
"description": "X6 shape for rendering react components.",
"main": "lib/index.js",
"module": "es/index.js",
@ -31,9 +31,8 @@
"build:watch:esm": "yarn build:esm --w",
"build:watch:cjs": "yarn build:cjs --w",
"build": "run-p build:cjs build:esm build:umd",
"prebuild": "run-s lint clean",
"prepare": "yarn build",
"precommit": "lint-staged"
"prebuild": "run-s clean",
"prepare": "yarn build"
},
"lint-staged": {
"src/**/*.ts": [

View File

@ -18,9 +18,12 @@ export class ReactShapeView extends NodeView<ReactShape> {
}
getComponentContainer() {
return this.cell.prop('useForeignObject') === false
? (this.selectors.content as SVGElement)
: (this.selectors.foContent as HTMLDivElement)
return (
this.selectors &&
(this.cell.prop('useForeignObject') === false
? (this.selectors.content as SVGElement)
: (this.selectors.foContent as HTMLDivElement))
)
}
confirmUpdate(flag: number) {