hmrc / assets-frontend

Deprecated static assets for frontends on MDTP.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AutoComplete validation requires a global variable

adamliptrot-oc opened this issue · comments

When instantiating an autoComplete instance, you currently need to supply a global js object containing all the data for the suggestions to the validator. This is currently done via a data-suggestions attribute on the autocomplete html.

We should look at alternative approaches to pass this data back to the validator.

As discussed the need to have this on the host window object can go and this can just be sent in as an object via the data-suggestions attribute

@adamliptrot-oc Does the above PR (#709) close this issue?