/// <summary> /// Method invoked when the component has received parameters from its parent in /// the render tree, and the incoming values have been assigned to properties. /// </summary> protected override void OnParametersSet() { base.OnParametersSet(); var newValue = CurrentValueAsString; ChangeEventCallback = EventCallback.Factory.CreateBinder <string?>(this, __value => { CurrentValueAsString = __value; _ = OnValueSelected.InvokeAsync(__value); } , CurrentValueAsString); if (_oldValue != newValue) { _oldValue = newValue; RerenderRadioBoxes?.Invoke(); } }
private async Task SelectItem(Select2Option <TValue> option) { option.Select(); SelectedOption = option; CurrentValue = option.Value; if (OnValueSelected.HasDelegate) { await OnValueSelected.InvokeAsync(CurrentValue); } var module = await moduleTask.Value; await module.InvokeVoidAsync( "removeEventListener", UlInternalId); IsOpen = false; }