Patternslib/Patterns — pull request #359 by regebro (2014-03-04 10:03:26+00:00)
Title: Supporting id/text data for Autosuggest prefill.

At the moment the pre-fill attribute only supports a simple comma-separated list of values. But we need to be able to pre-fill with data that has both text and id so that we can be consistent with the auto-suggested data.

I'm not sure of the best way to do this. I first tried adding a "pre-fill-data" argument, but that changed the behaviour of the "pre-fill" argum,ent so it was no longer called 'cfg.preFill'. Instead I added a 'data' argument that will take JSON data, which is a simple and robust solution, although Cornelis suggested that it might not be designer-friendly. Suggestions welcome.