This looks 'hackish'. Looking at the typeahead code, `suggestionsRendered` is called exactly once per dataset, but only if there are results in the dataset. In other words, this code implicitely depends 1) on the order of the datasets, 2) the number of datasets and 3) that all datasets return something. 1 and 2 are implicitely correct right now (but still the solution is not robust and does not scale), I'm pretty sure that 3 depends on the query searched (try to search for a term that will return results on for the layer search, but not for the location search).

There has to be a better way to solve this. Not that I know one right now :)

Unfortunately, the event itself does not send any data from which to deduce for which dataset the event was triggered. Maybe that would be a good PR for typeahead (to add the dataset name as part of the event).