trigger
trigger copied to clipboard
Abstract React Trigger
When using the trigger inside multi level shadowDoms the "is click inside" functionality is not working as expected. The current implementation [inPopupOrChild](https://github.com/react-component/trigger/blob/8e0422d9e42f87b452cd5f07d67bab1d079d799c/src/index.tsx#L275) checks if the click event target is in...
在webComponent自定义元素a的shadow dom里面使用TimePicker组件,把这个自定义元素a放到另外一个webComponent自定元素b的shadow dom中,TimePicker组件无法选中时间,打开时间选择弹窗,第一次点击一个时间,弹窗不会关闭,这是正常的第二次点击时间,会自动关闭时间选择框。 排除后发现是依赖的这个项目的问题,useWinClick函数里面,win.addEventListener('mousedown', onTriggerClose, true)这里,在a元素里面的Popup组件打开的时候,点击Popup组件里面的某个元素,onTriggerClose函数执行参数的e.target是最外层的定义元素b,inPopupOrChild函数判断到这个b元素不是元素a或者元素a里面的内容,就把使用的Popup组件给关闭了。 复现链接https://codesandbox.io/p/sandbox/bold-tristan-pf2fhw?file=%2Findex.tsx%3A64%2C24
Bumps [@testing-library/react](https://github.com/testing-library/react-testing-library) from 15.0.7 to 16.0.0. Release notes Sourced from @testing-library/react's releases. v16.0.0 16.0.0 (2024-06-03) Features Move @testing-library/dom and @types/react-dom to peer dependencies (#1305) (a4744fa) BREAKING CHANGES @testing-library/dom was moved...
Bumps [eslint](https://github.com/eslint/eslint) from 8.57.1 to 9.11.1. Release notes Sourced from eslint's releases. v9.11.1 Bug Fixes 20fd916 fix: add @eslint/core, @types/estree, & @types/json-schema deps (#18938) (Nitin Kumar) 2738322 fix: add missing...
Bumps [react-dom](https://github.com/facebook/react/tree/HEAD/packages/react-dom) from 18.3.1 to 19.1.0. Release notes Sourced from react-dom's releases. 19.1.0 (March 28, 2025) Owner Stack An Owner Stack is a string representing the components that are directly...
Bumps [react](https://github.com/facebook/react/tree/HEAD/packages/react) from 18.3.1 to 19.1.0. Release notes Sourced from react's releases. 19.1.0 (March 28, 2025) Owner Stack An Owner Stack is a string representing the components that are directly...
This is a fix for #496 which was introduced in https://github.com/react-component/trigger/pull/419 That change moved setting the height/width to before the popupElement reset, which makes the calculations that use height/width incorrect....
Bumps [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom) from 18.3.5 to 19.0.4. Commits See full diff in compare view [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) You can trigger a rebase of this PR by commenting `@dependabot rebase`. [//]: #...
Bumps [eslint](https://github.com/eslint/eslint) from 8.57.1 to 9.23.0. Release notes Sourced from eslint's releases. v9.23.0 Features 557a0d2 feat: support TypeScript syntax in no-useless-constructor (#19535) (Josh Goldberg ✨) 8320241 feat: support TypeScript syntax...