question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] search field doesn't work

See original GitHub issue

Bug report

What I did

The search field is already there by default.

What I expected to happen

I expect that the results are filtered.

What happened

The results are not filtered.

Capture d’écran 2022-01-07 à 11 16 23

Is it a bug in the latest version of Backpack?

After I run composer update backpack/crud the bug… is it still there?

Yes

Backpack, Laravel, PHP, DB version

When I run php artisan backpack:version the output is:

`### PHP VERSION: PHP 7.4.19 (cli) (built: May 12 2021 21:21:38) ( NTS ) Copyright © The PHP Group Zend Engine v3.4.0, Copyright © Zend Technologies with Zend OPcache v7.4.19, Copyright ©, by Zend Technologies

LARAVEL VERSION:

v8.45.1@dc2f0bb02c3eb4b27669d626bb3e810db8e7749d

BACKPACK VERSION:

4.1.63@c3a09d64090cc15c51df7898889d763aaa335260`

Any ideas how to fix it ?

Thanks.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
gaelle-caricommented, Jan 17, 2022

Hello @tabacitu and @pxpm,

I just fixed the bug, I removed ->type('string') and it works !

Thanks a lot for your help 😃

0reactions
gaelle-caricommented, Jan 17, 2022

Hello @tabacitu and @pxpm,

Sorry, I was on vacation 😃

You could try adding custom search logic to the column https://backpackforlaravel.com/docs/4.1/crud-columns#custom-search-logic-for-columns if the ajax request happens to be made.

@pxpm Thanks for this suggestion, it works but I still don’t understand why it doesn’t work without custom search logic ?

So the problem is... you write "Office" in the search input and NOTHING happens? Nothing is filtered?

Yes that’s it. It’s weird because it works with custom search logic…

Is the search() method overriden in you CrudController, by any chance? No, there isn’t a CrudController. Any ideas ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

10 Ways to Fix the Windows Search Bar Not Showing or ...
5. Restart the Windows Search Service. If your Windows search bar still doesn't work, restarting the Windows Search service may fix the issue....
Read more >
Fix problems in Windows Search - Microsoft Learn
If Windows Search is unresponsive or the search results don't appear as expected, try any of the following solutions in this article.
Read more >
Windows 11 Search Not Working? Try These Fixes - Lifewire
Windows 11 search can sometimes not let you type, or won't open or work properly. Here are some things to try to fix...
Read more >
Windows 11 Search Bar Not Working? Here's 9 Ways to Fix It
The Windows 11 Search bar error is a widespread bug where the search bar is disabled, not allowing you to type anything at...
Read more >
How to Fix Search Bar Not Working in Windows 10 ... - YouTube
This video what to do when the search bar is not working properly in Windows 10. In some cases, you may not be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found