playbook_ui 14.5.0.pre.rc.4 → 14.5.0.pre.rc.6

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: 2320898ed4171121a268e62bfac933bf34c936ed7bbd1eadc3d815a8225caa13
4
+ data.tar.gz: d05a4ddd57b7b7bdccbaf306bd639bbfb81c380a742cbf9ab7e09eb37e27eee4
5
5
  SHA512:
6
- metadata.gz: c45481f61a83332e142cb028be5473c01a0f05b450376179edd5f68608d8fc6a88a140e74a3eef029c2dcc7f0a63d0b93a03219e60002e1858c3d9485c225436
7
- data.tar.gz: d88e278a42278354c22a7e431517ed963b7f87322db9c5489546e36bb8c835c9c21db90c7bfd348764aa63fcda0ec85c71d82ab8938c773b97ecb075b8ffef43
6
+ metadata.gz: d607e925a8f9672e7d120802051762cd82b3367bacebd96cacd396f117bd5e89a6d67c659b3b7f42b8033b724dfc86de56d754940e358092b8fd1dd87b344c38
7
+ data.tar.gz: 3b54a1ac3358502f0f6555bbbe936d5db88a6650089fb6f631c8235da55b3fefa963099e84f025bb2585a74d0e3b64c7e6e8351f88b7a5596ef389d3bca19a40
@@ -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>