Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

data-autocomplete-id-field not rendered correct in editorTemplates #22

Open
peterdew opened this issue Oct 19, 2017 · 0 comments
Open

Comments

@peterdew
Copy link
Collaborator

The data-autocomplete-id-field renders incorrect in editorTemplates.

For example : a Model has a propery Work wich in turn has property's OrganisationPlaceNumber and OrganisationPlaceName.

in the view the Work property will be rendered through a EditorFor-helper . In the EditorTemplate for 'Work' the code:
@Html.HiddenFor(model=>model.OrganisationPlaceNumber) renders as:
<input id="Work_OrganisationPlaceNumber" type="hidden"...

But the code
@Html.AutocompleteFor(model => model.OrganisationPlaceName, model => model.OrganisationPlaceNumber, "GetOrganisationPlaces", "Change", false)
renders as
<input class="typeahead tt-hint" data-autocomplete-id-field="OrganisationPlaceNumber" ....
instead of
<input class="typeahead tt-hint" data-autocomplete-id-field="Work_OrganisationPlaceNumber" ....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant