public BaseCoreMatSelect() { jsHelper = new MatSelectJsHelper(); jsHelper.SetValueEvent += JsHelper_SetValueEvent; ClassMapper .Add("mat-select") .Add("mdc-select") .If("mdc-select--outlined", () => Outlined) .If("mdc-select--disabled", () => Disabled) .If("mdc-select--with-leading-icon", () => Icon != null); HelperTextClassMapper .Add("mdc-text-field-helper-text") .If("mdc-text-field-helper-text--persistent", () => HelperTextPersistent) .If("mdc-text-field-helper-text--validation-msg", () => HelperTextValidation); CallAfterRender(async() => { jsHelperReference ??= DotNetObjectReference.Create(jsHelper); await JsInvokeAsync <object>("matBlazor.matSelect.init", Ref, jsHelperReference, switchTK.FormatValueAsString(GetKeyFromValue(CurrentValue), null)); }); }
public BaseMatSelect() { ClassMapper .Add("mat-select") .Add("mdc-select") .If("mdc-select--outlined", () => Outlined) .If("mdc-select--disabled", () => Disabled) .If("mdc-select--with-leading-icon", () => Icon != null); HelperTextClassMapper .Add("mdc-text-field-helper-text") .If("mdc-text-field-helper-text--persistent", () => HelperTextPersistent) .If("mdc-text-field-helper-text--validation-msg", () => HelperTextValidation); }