hmrc / assets-frontend

Deprecated static assets for frontends on MDTP.
Apache License 2.0
16 stars 64 forks source link

AutoComplete validation requires a global variable #716

Open adamliptrot-oc opened 7 years ago

adamliptrot-oc commented 7 years ago

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.

feedmypixel commented 7 years ago

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

rpowis commented 7 years ago

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