Click event handler to control resetting the component - #195
Conversation
There was a problem hiding this comment.
This looks to be working really well! Nice work @HAL-NINE-THOUSAND 😃. I've asked one little nit pick, see what you think.
When I was testing it I found the Typeahead to but a little sluggish when closing, I thought one of the Task.Delays might be causing the issue and I was right. I removed it and everything worked as expected and the speed was much much better. The offending line is 289 inside the ResetControl method. With that delay removed the method can be changed to a void type as well.
I would have added this as a code suggestion on the review but I can't make suggestions on code you didn't edit, as far as I can see. Would you be able to make this change as well? Then we can get this merged.
| var bId = "";//get the blazor internal ID to distinguish different components | ||
| for (var clearCount = 0; clearCount < searchTextElement.attributes.length; clearCount++) { | ||
| var a = searchTextElement.attributes[clearCount]; | ||
| if (a.name[0] == '_') { |
There was a problem hiding this comment.
Nit pick: Should this be _bl_ as that is the full prefix Blazor uses for internal IDs?
There was a problem hiding this comment.
Yep good point, I just have an aversion to js startsWith for compatibility issues but I think that's an aversion I can now start to let go ^^ - this is included in the new commit
also changed outside click js check for _bl_ to be more specific
|
Hi Chris, Thanks, I've committed the delay removal the better ID check |
There was a problem hiding this comment.
Looks great! Thank you @HAL-NINE-THOUSAND
|
Glad I could help Chris, your libraries have been fantastic for learning Blazor and actually getting it out there in the wild |
Hi Chris,
As requested, a PR for #183
Resolves #183