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

Modal changing URL #41

Closed
rudolfbruder opened this issue May 30, 2021 · 2 comments
Closed

Modal changing URL #41

rudolfbruder opened this issue May 30, 2021 · 2 comments

Comments

@rudolfbruder
Copy link

Hello,

I am facing an issue that when i open the modal it changes my url of the page. Which is fine but it does not change it back on closure. Which leads to potential problems if users want to share link of the page or hit reload. Is there some solutions on that ? I am calling the modal from within another livewire component like this:

<button type="button" class="btn btn-primary" wire:click="$emit('openModal', 'backend.shared.media-item-selector')">{{__('components.media_item_selector.btn_text')}}</button>

Upon opening the modal the url in browser changes to this:
image

Thank you!

@rudolfbruder
Copy link
Author

I found out that this is an issue with using Livewire Pagination inside the modal.

My solution was to switch to classic pagination with customized pagination component.

Do you think of some other solution how the livewire pagination would not affect the url?

@PhiloNL
Copy link
Contributor

PhiloNL commented Jun 1, 2021

Pagination 'should' work but it sometimes can be a bit buggy. A PR was made to make it easier to work with pagination but it didn't make it, unfortunately. livewire/livewire#1997

@PhiloNL PhiloNL closed this as completed Jun 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants