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

SelectFilter ->multiple() causes a second livewire call on page load #10664

Open
bpudenz opened this issue Jan 5, 2024 · 3 comments
Open

SelectFilter ->multiple() causes a second livewire call on page load #10664

bpudenz opened this issue Jan 5, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request low priority
Milestone

Comments

@bpudenz
Copy link

bpudenz commented Jan 5, 2024

Package

filament/tables

Package Version

v3.1.35

Laravel Version

v10.39.0

Livewire Version

v3.3.5

PHP Version

PHP 8.2

Problem description

Adding ->multiple() to a SelectFilter causes an extra livewire call on the first page hit. Comment it out and the POST to livewire does not happen.

Screenshot 2024-01-05 at 1 33 33 PM Screenshot 2024-01-05 at 1 33 43 PM

Expected behavior

I would expect a single GET request unless a change is made.

Steps to reproduce

Comment out a single line of code ->multiple() on a SelectFilter.

Reproduction repository

https://github.com/bpudenz/filter-issue

Relevant log output

No response

Donate 💰 to fund this issue

  • You can donate funding to this issue. We receive the money once the issue is completed & confirmed by you.
  • 100% of the funding will be distributed between the Filament core team to run all aspects of the project.
  • Thank you in advance for helping us make maintenance sustainable!
Fund with Polar
@danharrin
Copy link
Member

The options for searchable & multi-selects are loaded after the initial page load. This is to reduce the initial page loading time. The options are not required until the user clicks on the dropdown, but we preload them so this process is faster.

@danharrin danharrin closed this as not planned Won't fix, can't repro, duplicate, stale Jan 8, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in Roadmap Jan 8, 2024
@danharrin danharrin added this to the v3 milestone Jan 8, 2024
@bpudenz
Copy link
Author

bpudenz commented Jan 8, 2024

Is there a way to opt out of preloading them? We have multi-selects on many pages, and loading a full page component a second time for all users so that a select box most users don't interact is ready on click seems unreasonable.

@danharrin
Copy link
Member

I will look into it, but not guaranteeing anything.

@danharrin danharrin reopened this Jan 8, 2024
@github-project-automation github-project-automation bot moved this from Done to Todo in Roadmap Jan 8, 2024
@danharrin danharrin added enhancement New feature or request and removed bug Something isn't working unconfirmed labels Mar 14, 2024
@polar-sh polar-sh bot added the Fund label Jun 3, 2024
@danharrin danharrin removed the fund label Jun 4, 2024
@danharrin danharrin modified the milestones: v3, v4 Jul 30, 2024
@danharrin danharrin modified the milestones: v4.0.0-alpha, v4 Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request low priority
Projects
Status: Todo
Development

No branches or pull requests

2 participants