react-play icon indicating copy to clipboard operation
react-play copied to clipboard

🐛 [Bug report]: Search plays on typing text instead of hitting enter all the time

Open nishasen opened this issue 3 years ago • 9 comments

Descrcibe the bug?

When we search any play from the search bar we have to hit enter all the time, whereas it should search whenever the search text changes.

Steps to reproduce the bug?

  1. Go to search for a play on the top navigation bar.
  2. On typing something you always have to press enter to make a search

Expected behavior

The expected behavior of the search bar should be to provide search results whenever a person types something to it, instead of hitting enter all the time to search. Doing this way would give more results.

Desktop (Please provide your system information)

OS : Windows Browser: Chrome, firefox

Mobile (Please provide your device information)

No response

Screenshot / Screenshare

No response

Relevant log output

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

nishasen avatar Oct 15 '22 15:10 nishasen

Hello! Thank you for filing an issue. If this is a bug report, please include relevant logs to help us debug the problem.

github-actions[bot] avatar Oct 15 '22 15:10 github-actions[bot]

@atapas I would like to take this up and fix the issue

nishasen avatar Oct 15 '22 15:10 nishasen

We have this to minimize the backend calls. What's your suggestions to fix it?

atapas avatar Oct 16 '22 02:10 atapas

We have this to minimize the backend calls. What's your suggestions to fix it?

We can use debounce for minimizing the backend call According to recent situation there is only one backend call that is whenever we hit enter If we use debounce we can set a delay so the backend calls will happen only after a certain delay What do you suggest in this?

nishasen avatar Oct 16 '22 17:10 nishasen

Doing it the way @siddxharth is doing will cause a lot of backend calls

nishasen avatar Oct 16 '22 17:10 nishasen

Doing it the way @siddxharth is doing will cause a lot of backend calls

Can we put a timeout on it then? After x micro-seconds of receiving the last input, the search will play?

siddxharth avatar Oct 16 '22 18:10 siddxharth

Doing it the way @siddxharth is doing will cause a lot of backend calls

Can we put a timeout on it then? After x micro-seconds of receiving the last input, the search will play?

Actually this is were debounce comes into play, it puts a timer on calling the api only on certain intervals when we start typing

nishasen avatar Oct 16 '22 18:10 nishasen

Okay, will give it a try. Can you assign me this?

siddxharth avatar Oct 16 '22 18:10 siddxharth

Okay, will give it a try. Can you assign me this?

Hey I cant assign as I am not the owner of the repo, I think I have the solution though let @atapas confirm, if this could be a way.

nishasen avatar Oct 16 '22 18:10 nishasen

There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a 👍 Because this issue is marked as stale, it will be closed and locked in 7 days if no further activity occurs. Thank you for your contributions!

github-actions[bot] avatar Nov 16 '22 12:11 github-actions[bot]

There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a 👍 Because this issue is marked as stale, it will be closed and locked in 7 days if no further activity occurs. Thank you for your contributions!

github-actions[bot] avatar Oct 17 '23 12:10 github-actions[bot]