zer0tonin / Mikochi

A minimalist file-manager with streaming capabilities
MIT License
224 stars 12 forks source link

Typing into the search bar causes double requests #11

Closed zer0tonin closed 3 months ago

zer0tonin commented 4 months ago

For some reason when we're using the search function, every request is fired twice. I assume this might come from a poorly defined useEffect hook.

suyash-sneo commented 3 months ago

Hi @zer0tonin. I'm new to OSS and am looking for a place to make my first contribution. If this issue is still up for grabs I'd like to take this up

zer0tonin commented 3 months ago

@suyash-sneo sure, go ahead. And don't hesitate to ask if you need help

suyash-sneo commented 3 months ago

Hi @zer0tonin I have raised a PR with quite a simple fix. Just removed searchQuery from a compound listener on searchQuery, refresh. searchQuery has its own listener that updates the refresh, which, in turn, can invoke the original listener

zer0tonin commented 3 months ago

Thanks a lot!