playbook_ui 14.5.0.pre.rc.4 → 14.5.0.pre.rc.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 79f9b4c72f89ba63eecf8638ec8c27fb9a62e9a9e2566eeec8d7f10087aea924
4
- data.tar.gz: 415d204f126cddba6763bbc1ca22ba76db3a72403f5e3d407ffb992be12f901b
3
+ metadata.gz: 8bb4fc0b70639490033875fbbf734462b07c72cdf35a2b9b9ca5f670dd5cd433
4
+ data.tar.gz: e26233f28c5914392ddc16a87a3107bd39b4943e14d002c409a54a9bc1d4b06f
5
5
  SHA512:
6
- metadata.gz: c45481f61a83332e142cb028be5473c01a0f05b450376179edd5f68608d8fc6a88a140e74a3eef029c2dcc7f0a63d0b93a03219e60002e1858c3d9485c225436
7
- data.tar.gz: d88e278a42278354c22a7e431517ed963b7f87322db9c5489546e36bb8c835c9c21db90c7bfd348764aa63fcda0ec85c71d82ab8938c773b97ecb075b8ffef43
6
+ metadata.gz: 10e77672d5309d7cbed79807fea62086fa30b40f268209342163a79d6eb1ac66050961070543d5077ba8f87af8d6f30dfe65e797c83761aade59d23f3acef79e
7
+ data.tar.gz: b442a063e7fd932c3bac853e9033cff26c1d2118e43d2c1ef2badde4aa0ddad302a9ae7d912a4f43b02dc176039c818b5e47e3fc67749d2135f89f9cb6acaf80
@@ -88,6 +88,9 @@ const MultiLevelSelect = (props: MultiLevelSelectProps) => {
88
88
  item: []
89
89
  })
90
90
 
91
+ const arrowDownElementId = `arrow_down_${id}`
92
+ const arrowUpElementId = `arrow_up_${id}`
93
+
91
94
  const modifyRecursive = (tree: { [key: string]: any }[], check: boolean) => {
92
95
  if (!Array.isArray(tree)) {
93
96
  return
@@ -173,7 +176,12 @@ const MultiLevelSelect = (props: MultiLevelSelectProps) => {
173
176
  useEffect(() => {
174
177
  // Function to handle clicks outside the dropdown
175
178
  const handleClickOutside = (event: any) => {
176
- if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
179
+ if (
180
+ dropdownRef.current &&
181
+ !dropdownRef.current.contains(event.target) &&
182
+ event.target.id !== arrowDownElementId &&
183
+ event.target.id !== arrowUpElementId
184
+ ) {
177
185
  setIsDropdownClosed(true)
178
186
  }
179
187
  }
@@ -260,7 +268,6 @@ const MultiLevelSelect = (props: MultiLevelSelectProps) => {
260
268
 
261
269
  // Handle click on input wrapper(entire div with pills, typeahead, etc) so it doesn't close when input or form pill is clicked
262
270
  const handleInputWrapperClick = (e: any) => {
263
- e.stopPropagation()
264
271
  if (
265
272
  e.target.id === "multiselect_input" ||
266
273
  e.target.classList.contains("pb_form_pill_tag")
@@ -518,16 +525,20 @@ const MultiLevelSelect = (props: MultiLevelSelectProps) => {
518
525
  </div>
519
526
 
520
527
  {isDropdownClosed ? (
521
- <div key="chevron-down">
528
+ <div id={arrowDownElementId}
529
+ key="chevron-down">
522
530
  <Icon
523
531
  icon="chevron-down"
532
+ id={arrowDownElementId}
524
533
  size="xs"
525
534
  />
526
535
  </div>
527
536
  ) : (
528
- <div key="chevron-up">
537
+ <div id={arrowUpElementId}
538
+ key="chevron-up">
529
539
  <Icon
530
540
  icon="chevron-up"
541
+ id={arrowUpElementId}
531
542
  size="xs"
532
543
  />
533
544
  </div>