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

Update UidFilter.php #1788

Closed
wants to merge 1 commit into from
Closed

Conversation

josephzhao
Copy link

isSearchEnabled function returned null error

Subject

I am targeting this branch, because {reason}.

Closes #{put_issue_number_here}.

Changelog

### Added
- Some `Class::newMethod()` to do great stuff

### Changed

### Deprecated

### Removed

### Fixed

### Security

isSearchEnabled function returned null error
@VincentLanglet
Copy link
Member

Hi @josephzhao

The issue is more with the fact there is no default value for the global_search option, like there is in the StringFilter
https://github.com/sonata-project/SonataDoctrineORMAdminBundle/blob/4.x/src/Filter/StringFilter.php#L115

@jordisala1991 When you introduced this filter it implemented the SearchableFilterInterface, is there a reason ?
Which value should be use as default for the global search (true ? false ?)

@BillyMorgan
Copy link

Hate to be that bump guy but... bump? This is being made even worse for me cause I'm hitting it via the SonataUser bundle, which doesn't allow me to disable searching on the UUID fields. I'm gunna log an issue on that repo too and whoever fixes it first will be the coolest. That's right, it's a who's the coolest race.

@VincentLanglet
Copy link
Member

Hate to be that bump guy but... bump? This is being made even worse for me cause I'm hitting it via the SonataUser bundle, which doesn't allow me to disable searching on the UUID fields. I'm gunna log an issue on that repo too and whoever fixes it first will be the coolest. That's right, it's a who's the coolest race.

Instead being the one complaining, you can be the one fixing it.

This PR does not pass requirement therefor cannot be merged.
Also, I explained in my post the right way to fix it.

It's just to add 'global_search' => false, in the getDefaultOptions method.

Feel free to open the PR instead waiting someone to work for you.

@BillyMorgan
Copy link

Amazing! Thanks heaps for the fix @VincentLanglet 🙇

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.

3 participants