I am getting the same problem here. I have on the same page one CustomDropdown where I can select a CLIENT. And a second CustomDropdown where I can select one of the ORDERS or INVOICES which belong already to the client.
If I select the client first and then click on one of the other CustomDropdowns then they load and show the correct options to pick. But if I then change the CLIENT again the CustomDropdowns still show the options for the old client.
- via onChange event of the CLIENT Dropdown to refresh the Dropdown for the ORDERS and INVOICE and every object above it which contains it (without refreshing the page itself)
- via onFocus event on ORDERS and INVOICES to refresh in Nanoflow and Microflow (with requesting refresh in client)
- even deleted the CustomDropdown Context object in Nanoflow and Microflow
In some cases the Dropdowns show a “loading”. But in all cases they continue to show the old list of options.
Unless I refresh the entire page.
Any new advice how this could be resolved? As otherwise this makes the CustomDropdown in some cases less useful than it could be.
After posting this problem as issue on GitHub (here: https://github.com/mendixlabs/CustomDropdown/issues/37) I got following answer from Nick Jansen (who seems to be the original or main author behind the CustomDropdown Widget):
Nice to hear you are using the widget! What you describe was indeed an issue, @NammNguyen and @BananiMendix ran into the same thing and opened a pull request that solves this issue. I just created a release and published the new version in the mendix marketplace. The new version has added a boolean named "Refresh on context change" in the options section, set it to Yes and make sure you create a new context object each time you want to refresh the default options. I hope this also solves your problem.
After updating to the new CustomDropdown widget I
I will optimize my version a little bit but in case you need some screenshots or more details to be shared just let me know.