Beispiel #1
0
 protected override void OnInitialized()
 {
     base.OnInitialized();
     SetClass();
     CheckboxGroup?.AddItem(this);
     _isInitalized = true;
 }
        protected async Task InnerCheckedChange(bool @checked)
        {
            if (!this.Disabled)
            {
                this.Checked = @checked;
                await this.CheckedChange.InvokeAsync(this.Checked);

                CheckboxGroup?.OnCheckboxChange(this);
            }
        }
        protected async Task InputCheckedChange(ChangeEventArgs args)
        {
            if (args != null && args.Value is bool value)
            {
                await base.ChangeValue(value);

                if (CheckedChange.HasDelegate) //kept for compatibility reasons with previous versions
                {
                    await CheckedChange.InvokeAsync(value);
                }
                CheckboxGroup?.OnCheckboxChange(this);
            }
        }
        protected async Task InnerCheckedChange(bool @checked)
        {
            if (!this.Disabled)
            {
                if (this.CheckedChange.HasDelegate)
                {
                    await this.CheckedChange.InvokeAsync(@checked);
                }

                await this.CheckedChange.InvokeAsync(@checked);

                CheckboxGroup?.OnCheckboxChange(this);
            }
        }
 protected override void Dispose(bool disposing)
 {
     CheckboxGroup?.RemoveItem(this);
     base.Dispose(disposing);
 }