Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.x] Fix autocomplete & some other reactivesearch errors #683

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default {
}

// No child categories, get siblings instead.
let parentCategoryId = categoryPaths[0].key.at(-2)
let parentCategoryId = categoryPaths[0]?.key.at(-2)
return allCategoryPaths.filter(
(bucket) => bucket.key.includes(parentCategoryId) && bucket.key.at(-1) !== parentCategoryId,
)
Expand Down
5 changes: 3 additions & 2 deletions resources/js/components/Listing/Listing.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ export default {
loaded: false,
attributes: useAttributes(),
pageSize:
(Turbo?.navigator?.location?.searchParams || new URLSearchParams(window.location.search)).get('pageSize') ||
config.grid_per_page,
(('Turbo' in window && Turbo?.navigator?.location?.searchParams) || new URLSearchParams(window.location.search)).get(
'pageSize',
) || config.grid_per_page,
}),

render() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
@php $inputClasses = 'relative z-header-autocomplete border !font-sans !border-default !text-sm !min-h-0 outline-0 ring-0 !h-auto rounded-xl !pl-5 !pr-24 !py-3.5 !bg-white w-full focus:ring-transparent search-input' @endphp

@once
@if ($file = vite_filename_path('Autocomplete.vue'))
@vite([$file])
@endif
@endonce

<div v-if="!$root.loadAutocomplete" class="relative w-full">
<label for="autocomplete-input" class="sr-only">@lang('Search')</label>
<input
Expand Down
Loading