Skip to content

Commit

Permalink
add a fix on error to expand the accordion
Browse files Browse the repository at this point in the history
  • Loading branch information
atmonshi committed Jun 10, 2024
1 parent 125a0aa commit 890fdf2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions resources/views/components/accordion/item.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,18 @@
id: $id('accordion'),
@if($isIsolated) activeAccordion: 'accordion-{{ $activeAccordion }}', @endif
}"

:x-on:form-validation-error.window="
$nextTick(() => {
let error = $el.querySelector('[data-validation-error]');
if (! error) {
return
}
setActiveAccordion($id('accordion'));
})
"
class="fi-accordion-item group"
>
<button
Expand Down

0 comments on commit 890fdf2

Please sign in to comment.