playbook_ui 14.5.0.pre.rc.3 → 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 +4 -4
- data/app/pb_kits/playbook/pb_dialog/_dialog.scss +2 -0
- data/app/pb_kits/playbook/pb_dialog/dialog_header.html.erb +1 -1
- 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/dist/playbook.css +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: 8bb4fc0b70639490033875fbbf734462b07c72cdf35a2b9b9ca5f670dd5cd433
|
4
|
+
data.tar.gz: e26233f28c5914392ddc16a87a3107bd39b4943e14d002c409a54a9bc1d4b06f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10e77672d5309d7cbed79807fea62086fa30b40f268209342163a79d6eb1ac66050961070543d5077ba8f87af8d6f30dfe65e797c83761aade59d23f3acef79e
|
7
|
+
data.tar.gz: b442a063e7fd932c3bac853e9033cff26c1d2118e43d2c1ef2badde4aa0ddad302a9ae7d912a4f43b02dc176039c818b5e47e3fc67749d2135f89f9cb6acaf80
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<%= pb_rails("flex", props: {classname:object.classname, spacing:"between", padding:"sm", align:"center"}) do %>
|
3
3
|
<%= content.presence || object.title %>
|
4
4
|
|
5
|
-
<button class="dialog-button-class" type="button" data-close-dialog= <%= object.id %> >
|
5
|
+
<button class="dialog-button-class pb_dialog_close_icon" type="button" data-close-dialog= <%= object.id %> >
|
6
6
|
<%= pb_rails("icon", props: { custom_icon: Playbook::Engine::root.join(times_icon) }) %>
|
7
7
|
</button>
|
8
8
|
<% end %>
|
@@ -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>
|