Using the latest SmartClientJS 13 LGPL version, I'm trying to prevent a data refresh when a search form is submitted in a ListGrid (thus the "searchForm" property is set to an instance of SearchForm). I have a situation that I want to require certain search fields (conditionally). I have tried asking ChatGPT (free version) for a solution, but that didn't work. Before that I have tried a couple of things myself:
- Make the search field required. It doesn't seem to validate the field when submitting the form (which I do programmatically in a changed() event of the search field).
- Override the submit() method of the search form and add field errors when a value is missing. This doesn't seem to work either, most likely because the ListGrid observes the submit() method of the "searchForm" property. The observer calls the searchFormChanged() method, but I don't think I should override that, because it is undocumented.
Comment