Skip to content

Commit

Permalink
Merge pull request #11 from lara-zeus/on-error
Browse files Browse the repository at this point in the history
add a fix on error to expand the accordion
  • Loading branch information
atmonshi authored Jun 10, 2024
2 parents 125a0aa + 890fdf2 commit 1ce1db9
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 1ce1db9

Please sign in to comment.