-
Notifications
You must be signed in to change notification settings - Fork 8
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
Class attributes are not applied from AutocompleteFor() #5
Comments
Hi there, are you using the latest version of AutocompleteFor? I added in the functionality you are requesting in the latest version. You can see in the Wiki on this site that my tests show this works. If you have a test where this is failing, can you please send me the source code? Thanks |
I'm using via NuGet; I've verified that the specified class is not appearing in your sample web application as of 15/03/2016 12:00 GMT. I haven't tried running your unit tests but given that I'm seeing the same behavior in both the sample app and my own it would seem that there's a bug there. Unit tests are all very well but sometime an issue appears only when you actually go and try it :) Generated output by right-clicking the Name field in Chrome; As you can see: no class attribute specified with "form-control" |
Thank you for your detailed response :) I will take a look. |
The issue is on line 102 of HtmlHelpers. |
Can you make the change and issue a pull request? Sent from my iPhone
|
@mnbob70 that was totally correct Bob, but this code is changed by the recent merge from Groblerf. I'll test this issue against the new code asap |
Hi Peter,
Sounds good! Thanks for your work.
…Sent from my iPhone
On Sep 19, 2017, at 2:53 AM, Peter de Witte ***@***.***> wrote:
The code is changed recent merge from Groblerf. I'll test this issue against the new code asap
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
To reproduce: Use @Html.AutocompleteFor() in a view to render the typeahead, setting the last parameter to
new { htmlAttributes = new { @class = "form-control" } }
Result: Typeahead is rendered with class "typeahead tt-input" but no "form-control".
Note: this occurs in the sample application in the documentation.
Fix (for me anyway) via jQuery;
The text was updated successfully, but these errors were encountered: