playbook_ui 14.4.0.pre.alpha.PBNTR490multilevelselect3832 → 14.4.0.pre.alpha.PLAY1546highchartsbump3822

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