I have a ComboBoxItem pointing at an optionDatasource. The database table behind the optionDatasource has a large amount of records (3.6 million). Is it possible to put a limit similar to the FetchDelay time so not send a request less than 3 characters?
I am aware I could enfore this in my backend would prefer not to due to providing a common interface to external systems and I am reluctant to create more than one resource for a single db table. Additionaly I would prefer not to make requests which are ignored.
This works in that it waits until the string has 3 chars but the cbi.setShowPickListOnKeypress(false) doesnt work for turning it off.
The other attempt is to manage the pickListCriteria myself and only change it when the length is >3 then call fetchData on the CBI manually. However as this had the overhead of doing a call on every keypress I thought the above is a better temporary solution.
Not the cleanest solution, but one approach would be to implement a transformRequest handler that provides a stubbed response if the criteria is too short. You would provide the response via switching to dataProtocol:“clientCustom” on the fly. The response could contain a record whose data value is “Please enter 3 or more characters to see results” so the user knows what’s going on.