will-ks / Bubble-Plugin-Search-Autocorrect

A fuzzy search plugin for the Bubble.is platform
MIT License
3 stars 19 forks source link

input box match should treat empty as ALL #1

Open takeyourmarc opened 6 years ago

takeyourmarc commented 6 years ago

Search doesn't treat empty the same as a space. When I load my page and the repeating group query is set to match text from an input box an empty input box should match ALL records, it is matching none, but if i put a space in the input box, it then matches all.

will-ks commented 6 years ago

I don't think it should return all by default. Certainly there are cases where returning none is more useful, for instance when populating a dropdown. Perhaps I could add an option to return all or none depending on preference.

JohnR74 commented 5 years ago

I get around that right now by having a merged (unioned) data source. However when "resetting" the input box it still clears all results.

Zenpenguin commented 4 years ago

hi @dambusm, Thanks for the fantastic plugin. I use it in multiple places across my Bubble apps. However, I am facing difficulties without the enhancement to return all results if the user desires. Did you get around to coding this in? It would be wonderful if you could add this and update the plugin.

will-ks commented 4 years ago

Unfortunately not, I no longer have time to work on these Bubble plugins. I'm very happy to accept pull requests though if anyone wants to submit patches.

Zenpenguin commented 4 years ago

Hey @dambusm , Appreciate the quick response. Though my knowledge of JS is basic, your code is well documented and I think I understand what changes need to be made. I will be happy to work on a patch-hope you won't mind providing a little bit of guidance here and there, if needed.

I tried forking the plugin from Bubble in order to create a new version which I could test out before sending you the pull request- but I run into an error saying "This plugin does not have a repository in GitHub associated with it." Which is rather strange considering we are having this conversation here :D Do you have any idea why this might be happening? image

If we aren't able to resolve this then I can upload the modified code on Github, but will need your help in modifying the element on the Bubble editor to create the option for returning all the objects from the data source when the input box is empty. Please let me know how you want to proceed.

Cheers

will-ks commented 4 years ago

Hmm, no I don't know what the issue is, maybe Bubble support can help?

Otherwise yes I'm sure I can port over the changes if you just use a new Github project