playbook_ui 14.4.0.pre.alpha.PBNTR490multilevelselect3832 → 14.4.0.pre.alpha.PLAY1546highchartsbump3822
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.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +4 -15
- data/dist/chunks/_typeahead-D7A7UtDj.js +22 -0
- data/dist/chunks/_weekday_stacked-cRBjVQjA.js +45 -0
- 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 +3 -3
- data/dist/chunks/_typeahead-BErpxkBz.js +0 -22
- data/dist/chunks/_weekday_stacked-CGwn8Bd7.js +0 -45
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6bd72cfd66776d778ac938b9a8ec226a1602efc6e7bc5866784d2482987d62c7
|
4
|
+
data.tar.gz: cca369aa47b32f074ee1fe1f79a2a40a39f2aad530281f075aaf9ff4e77141b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
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>
|