I have a SC that queries the full table list, that I’d like to call upon for the user to search through only when they click on the input field. The SC will then load, and the user can then search the list.
Then when they choose the option inautocomplete - I then use a different SC to add that value to a new join table.
So the flow is this:
Page load - SC does not load
User clicks on input (because they want to search) - SC loads and presents user with the AutoComplete functinality.
User chooses autocomplete option and clicks add
new SC adds this value to a new join table.
What I’m stuck on is the dynamic event to load the SC that presents the autocomplete option list.
I have a massive list that I’m querying with a SC - I am just trying to avoid loading that list on page load, instead trigger the load when a user clicks on the input - I just need to know what dynamic event is the correct one to load the SC on the page.
I’m not sure I follow. So when you have no load selected the autocomplete doesn’t work either? Are you using the same SC for both the dynamic autocomplete and the results? If you are using the no load you will have to use two different server connects. One that loads (for autocomplete) and one that doesn’t (for results).
I think you could usually do what @brad suggests - add the event to the input field. However, I don’t think you can in this case because a different input field is created dynamcially when the auto-complete feature is used. You could add the event to some element containing the object - eg an onclick event which would load the SC. You would probably want to cache the data to avoid it being reloaded again (eg whenever the relevant area was clicked or the page reloaded).
The onClick event didn’t work on the input itself, but when I put the onClick event on the column that the input was contained within, it loaded the SC - which then gives the user the ability to search - and saves on page load.