Expose ReferenceElement for qualified input components#24899
Expose ReferenceElement for qualified input components#24899uabarahona wants to merge 9 commits into
Conversation
MackinnonBuck
left a comment
There was a problem hiding this comment.
Looks good! I had a couple small comments. @pranavkm, could you take a look?
pranavkm
left a comment
There was a problem hiding this comment.
This looks really good. Any chance we could add one test that verifies this works end-to-end? Something that verifies that you could Focus on the input element using this mechanism?
b5d30a2 to
6db9c7d
Compare
|
Tests were added and they brought up an issue where aspnetcore/src/Components/Web/src/Forms/InputRadioGroup.cs Lines 45 to 48 in 9177683 |
|
@barahonajm The problem you're describing is intended behavior - the radio buttons are re-rendered when the |
|
@MackinnonBuck I see, let me ask a little question shouldn't the Here the code on protected override void OnParametersSet()
{
var groupName = !string.IsNullOrEmpty(Name) ? Name : _defaultGroupName;
var fieldClass = EditContext.FieldCssClass(FieldIdentifier);
var changeEventCallback = EventCallback.Factory.CreateBinder<string?>(this, __value => CurrentValueAsString = __value, CurrentValueAsString);
_context = new InputRadioContext(CascadedContext, groupName, CurrentValue, fieldClass, changeEventCallback);
}The issue on E2E test is that the |
|
@barahonajm it must be because a new |
|
Yes, that's the reason I was not able to explain it well 😃, I added an equals to |
6db9c7d to
7f7873b
Compare
|
We discussed options and think it might be easier to not have the |
|
Got it, I have removed the Inputradio from the PR |
5a083aa to
6392ae3
Compare
|
Thanks @JuanElements for your PR. I've created another PR based on your changes here - #29555. We'll use that to track this to completion. |
Summary
As discussed on #24446 this PR is to expose "InputElement" which is a
ReferenceElement, some notes to take into account:InputElementname everywhere to keep consistency. [I think it's fine asselectis also a input, but I can change the name for select if it is really needed]setprotected to support inheritanceAddresses #24446