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 +4 -4
- data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +15 -4
- data/dist/chunks/{_typeahead-CSBT4Lkn.js → _typeahead-C1XR4Ez_.js} +1 -1
- data/dist/chunks/{_weekday_stacked-CkYnv1iF.js → _weekday_stacked-xHndqwxW.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/playbook-doc.js +1 -1
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/lib/playbook/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2320898ed4171121a268e62bfac933bf34c936ed7bbd1eadc3d815a8225caa13
|
4
|
+
data.tar.gz: d05a4ddd57b7b7bdccbaf306bd639bbfb81c380a742cbf9ab7e09eb37e27eee4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 (
|
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
|
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
|
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>
|