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.

clear searchbox button doesn't work !

See original GitHub issue

I have two instantsearch like this and create one search box to search both of of them together.

var searchProduct = instantsearch({
  appId: '...',
  apiKey: '...', 
  indexName: 'market_products'
});

var searchShop = instantsearch({
  appId: '...',
  apiKey: '...',
  indexName: 'market_shops'
});

var searchBox = instantsearch.widgets.searchBox({
  container: '#searchBox2',
  placeholder: 'جستجو'
});

searchProduct.addWidget(searchBox);
searchShop.addWidget(searchBox);

when I want to clear search box the button works for product but it doesn’t clear value for shop. it seems that shop query doesn’t work. what should I do ?

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
mahdi-gh1373commented, May 24, 2018

Thanks @bobylito It’s working now.

0reactions
bobylitocommented, May 23, 2018

The helper in instantsearch is initialized after the start and the searchFunction is triggered during the start. Therefore, given the code you showed, you should start searchProduct before searchShop.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Button to clear text and reset search input not working
As the accepted answer doesn't solve the problem. Try input event ... then clear the filter input field on which event you want....
Read more >
Clear Button in search box, not working JavaScript Error
If they want to start a new search, presumably they can click the X button here, and start fresh, sometimes it works, sometimes...
Read more >
Fix Clear Search History Button Greyed Out Safari iPhone
Fix Clear Search History Button Greyed Out Safari ... is a WebKit-based partially open source graphical web browser developed by Apple.
Read more >
Targeting Click of “Clear” Button (X) on Input Field
Everything is working as you expect – you can enter text into the search box, hit enter or the "Search" button, and see...
Read more >
Input Type Search Clear Button Gone · Issue #5624 - GitHub
When an input element is created of type "search", the clear button that is created by the browser does not display.
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