Skip to content

[codex] Preserve combobox search on selection#19

Merged
munezaclovis merged 4 commits into
prvious:mainfrom
clovis-mo:codex/preserve-search-on-select
Jun 10, 2026
Merged

[codex] Preserve combobox search on selection#19
munezaclovis merged 4 commits into
prvious:mainfrom
clovis-mo:codex/preserve-search-on-select

Conversation

@munezaclovis

@munezaclovis munezaclovis commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Preserve the active search query and filtered option list after selecting a non-empty single-select option.
  • Keep the existing reset behavior for the blank clear selection path so clearing restores the original options.
  • Update browser coverage for server-side search selection and add static filtered selection coverage.

Root Cause

selectOption() reset searchQuery, cleared the input value, and restored originalOptions for every single-select selection. That made dynamic and filtered results disappear immediately after clicking an option.

Automation Note

The fork has a Fix PHP Code Styling workflow that runs on any PHP push and auto-commits Pint changes. After the combobox test change was pushed, that workflow added a Fix styling commit for existing Pint differences in three workbench/test files. The functional combobox change itself is in resources/js/components/combobox.js, resources/dist/components/combobox.js, and tests/Browser/ComboboxTest.php.

Validation

  • node bin/build.js
  • vendor/bin/testbench filament:assets --no-interaction
  • Playwright MCP against http://127.0.0.1:8000/admin/posts/create:
    • static status search for pub keeps pub, keeps only Published, and marks it selected after click
    • server-side category_id search for Tech keeps Tech, keeps Technology, and marks it selected after click
    • clear button still clears the input and restores original static options
    • no browser warnings/errors
  • vendor/bin/pint --dirty
  • php -l tests/Browser/ComboboxTest.php && php -l src/Components/Combobox.php

Focused Pest browser tests could not run locally because this checkout's lock/vendor state is inconsistent: composer.json requires pestphp/pest-plugin-browser, but composer.lock does not include it, and composer install exits before installing dependencies.

@clovis-mo clovis-mo force-pushed the codex/preserve-search-on-select branch from c6ed8ae to 52c3af8 Compare June 10, 2026 17:48
@munezaclovis munezaclovis marked this pull request as ready for review June 10, 2026 17:51
@munezaclovis munezaclovis merged commit 8d58a15 into prvious:main Jun 10, 2026
2 of 3 checks passed
@clovis-mo clovis-mo deleted the codex/preserve-search-on-select branch June 10, 2026 18:02
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

Successfully merging this pull request may close these issues.

2 participants