Autocomplete No Results not appearing

Wappler: 6.5.4
OS: MacOS M1
Server: PHP

I have this working fine on older project but am trying to implement it on a new project but the dropdown isn't appearing when there are no results.

The dev console shows an error every time a key is pressed regardless of whether it returns a result:

Hey Jon,

  1. Just noticed on your error screenshot the main.js:1:1737957


    What is this main.js?
    You work on PHP, have you declared any javascript file “main.js”?
    I think that the autocomplete’s javascript file wouldn’t be called just “main.js”

  2. Do you pass the autocomplete’s value to another element (eg input) or just a simple autocomplete that

  3. You focused on the autocomplete’s “No Result” option…
    If you remove it, do you still have problem?

I’ve not done anything apart from use the normal Wappler UI.

Just a simple auto complete.

Makes no difference whether the No Result option is added or not.

Bump.

Might this be fixed tomorrow? I have just found out a previous project has broken because of this so it's pretty urgent.

I don't think the error is coming from the autocomplete. We don' have a file main.js and there is no instance property in the autocomplete code.

Try first to figure out where the main.js is coming from, is it loaded from your page, is it from the source maps or maybe it is from a browser plugin.

Aah, it could well be a browser plugin. I do have a few!

But, the autocomplete no longer showing the option for 'No results' is missing and it's been reported by a number of people so it's not a browser plugin issue.

Can you replicate it?

I'm able to reproduce it, no errors but also not showing the No Results message. Will post an update here in this topic if I fixed it.

2 Likes

Thanks Patrick. I would say the reference to the errors in the console are not to do with this so please ignore that. It's the lack of the No Results which is in need of a fix so I appreciate that.

Have an update here that should fix it, it works on my testpage.

dmxAutocomplete.zip (7.5 KB)

Ooh. Almost perfect. It's now showing the No Results item but is clicks it immediately so you don't get a chance to see it or continue searching.

To hopefully add a bit more info. I had it so that the No Results option appear and, when clicked, a modal opens with a form to add a new record. Today's update (I've installed 6.6.0 now, too) immediately opens the model. You briefly see the No Results appear and then modal appears over the top of it.

The modal that you open, you do this on the noresults or click event?

Hi Patrick. It's the No Results Click event.

New update: dmxAutocomplete.zip (7.5 KB)

Can you check if this update has the correct behavior as you expect it to be.

3 Likes

Perfect. That's back fully working just like it used to be. Thanks for that.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.

Fixed in Wappler 6.6.1