AuraQ / AutoCompleteForMendix

An autocomplete widget for mendix
Apache License 2.0
8 stars 31 forks source link

List items are garbage-collected on client #77

Open basi01 opened 2 years ago

basi01 commented 2 years ago

We use a microflow as a data source for the suggestions. This microflow creates new uncommitted objects for the suggestions that were not selected before (only the selected option is committed in the Before Commit microflow of the form entity).

If we wait long enough (usually 10 seconds) then clicking a suggested option simply clears the widget. It happens because the retrieved objects were garbage-collected as unused. Indeed, after adding to index.html:

        dojoConfig = {
            data: {
              "logCleanupStatistics": true
            },

the "Garbage collecting" message is printed to the browser console mentioning the guids of the suggestions. I think this widget needs to mark them as "used" while they're visible. According to this blog you need to subscribe to the objects for that.