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.

Possible to hide the search bar, yet use the search functionality?

See original GitHub issue

I currently already have a search bar at the top of my website and would like to use that search query to filter my table. The inbuilt search algorithm works fine for my use case. I am currently using this options config.

const options = {
      filterType: 'checkbox',
      searchText: this.getDefaultSearchValue(),
      searchOpen: false,
      search: false,
      responsive: 'vertical'
    }

However, while this removes the search icon, it initially still displays the inbuilt search field leaving me with two search fields. image

It looks like the searchText option is forcing the search text field to be open initially by default.

Is it possible to hide this search bar and icon at all times yet still using the inbuilt search functionality that the library provides?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8

github_iconTop GitHub Comments

2reactions
patorjkcommented, Jul 25, 2020

So good news, I was mistaken - when I did the 3.0 update, I did make searchText controllable, I just didn’t update the README for it. The example I posted previously had a bug in it (I was passing the string “business” rather than the variable “searchText” to the searchText option):

https://codesandbox.io/s/muidatatables-custom-toolbar-w3pf4?file=/index.js

I’ll update the README for the next release.

1reaction
GaganBhatcommented, Jul 25, 2020

Sweet, that’s perfect. Exactly what I was looking for. Thanks for following up, I’ll go ahead and close this issue now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to hide the search bar in Windows 10, and why you don't ...
Blog: http://www.bernardotech.orgFacebook: https://www.facebook.com/BernardoTechTwitter: http://www.twitter.com/bernardotech.
Read more >
Windows 10: How to Disable the Search Bar - Technipages
Right-click on the taskbar, then select “Hidden” under “Search” to hide the search bar. Tip: Using the search functionality while the search bar...
Read more >
Allow Search Box to be turned off/hidden
I've tried disabling Quick Launch from Tools > Options > Quick Launch, but this seems to have no effect on the new search...
Read more >
How to hide the search bar on the title bar in Office 365
Open Word in Office 365 and go to File>Options. On the Options window, go to the General tab and under the 'User Interface...
Read more >
How to Remove the Windows 10 Search Box from the Taskbar
Hide the Windows 10 Search Box ... To remove the search box you have a couple of options. Right-click in the box or...
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