The storage of the match and choices elements in arrays in src/js/directives/uiselect.js, using the name attribute as an index, allows for conflicts in which the ui-select is rendered with the wrong match and choices. This can quickly become a major issue on large single page applications, especially when one is using the naming convention to associate server side validation errors with the proper field.
Some examples of this coming into play are:
Separate routes containing forms where entities have similar fields.
Pages containing multiple form where entities have similar fields.
Looping structures containing forms, especially when the available values depend upon other values within the entity in question. (in this case you may see options for the wrong entity)
It is possible to make naming make naming conventions more complicated in the application code to work around this issue, however this is onerous, especially when extra code for validation is required.
The storage of the match and choices elements in arrays in src/js/directives/uiselect.js, using the name attribute as an index, allows for conflicts in which the ui-select is rendered with the wrong match and choices. This can quickly become a major issue on large single page applications, especially when one is using the naming convention to associate server side validation errors with the proper field.
Some examples of this coming into play are:
It is possible to make naming make naming conventions more complicated in the application code to work around this issue, however this is onerous, especially when extra code for validation is required.