Skip to content

Commit

Permalink
init select on document ready
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelfolaron committed Nov 20, 2024
1 parent fda173b commit 1376aa5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 0 additions & 2 deletions .idea/leantime-oss.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions .idea/php.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 9 additions & 3 deletions app/Views/Templates/components/forms/select/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,15 @@
</x-global::forms.field-row>

<script>
@if ($variant === 'tags')
jQuery(document).ready(initSelect);
htmx.onLoad(initSelect)
function initSelect() {
@if ($variant === 'tags')
leantime.selects.initTags('.select-{{ $formHash }}', {{ $search }}, {{ (!$autocompleteTags) ? 'false' : 'true' }}, '{{ $selectClassBuilder }}', {{ $maxItemCount }});
@else
@else
leantime.selects.initSelect('.select-{{ $formHash }}', {{ $search }}, '{{ $selectClassBuilder }}');
@endif
@endif
}
</script>

0 comments on commit 1376aa5

Please sign in to comment.