@acrool/react-picker 0.1.1-alpha.0 → 0.1.1-alpha.1

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/README.md CHANGED
@@ -34,9 +34,18 @@
34
34
  ## Install
35
35
 
36
36
  ```bash
37
- yarn add @acrool/react-picker
37
+ yarn add framer-motion @acrool/react-picker
38
38
  ```
39
39
 
40
+ in your packages. (Make the version of styled-component you use match the version of styled-component used in acrool-react-gird)
41
+
42
+ ```json
43
+ "resolutions": {
44
+ "framer-motion": "^11.x"
45
+ }
46
+ ```
47
+
48
+
40
49
  ## Usage
41
50
 
42
51
  add in your index.tsx
@@ -192,6 +201,20 @@ const DateTimeFieldAfter = (props: IProps, ref?: ForwardedRef<HTMLElement>) => {
192
201
  ```
193
202
 
194
203
 
204
+ ## There is an onClick event in the outer layer, causing the picker to click and trigger
205
+
206
+ It should be set in the outer layer to prevent bubbling.
207
+
208
+ ```tsx
209
+ const handleOnClick = (e: React.MouseEvent) => {
210
+ e.stopPropagation();
211
+ }
212
+
213
+ return <DropdownRoot onClick={handleOnClick}>
214
+ <DropTitle>{i18n('page.workspaceTask.action.subTask', {def: 'SubTask'})}</DropTitle>
215
+ </DropdownRoot>;
216
+ ```
217
+
195
218
  ## License
196
219
 
197
220
  MIT © [Acrool](https://github.com/acrool) & [Imagine](https://github.com/imagine10255)