コード例 #1
0
ファイル: Button.cs プロジェクト: weiplanet/Blazorise
        /// <inheritdoc/>
        protected override void OnInitialized()
        {
            // notify dropdown that the button is inside of it
            ParentDropdown?.NotifyButtonInitialized(this);

            // notify addons that the button is inside of it
            ParentAddons?.NotifyButtonInitialized(this);

            ExecuteAfterRender(async() =>
            {
                await JSModule.Initialize(ElementRef, ElementId, new
                {
                    PreventDefaultOnSubmit
                });
            });

            LoadingTemplate ??= ProvideDefaultLoadingTemplate();

            if (Theme != null)
            {
                Theme.Changed += OnThemeChanged;
            }

            base.OnInitialized();
        }
コード例 #2
0
ファイル: Button.cs プロジェクト: intronik/Blazorise
        /// <inheritdoc/>
        protected override void OnInitialized()
        {
            // notify dropdown that the button is inside of it
            ParentDropdown?.NotifyButtonInitialized(this);

            // notify addons that the button is inside of it
            ParentAddons?.Register(this);

            ExecuteAfterRender(async() =>
            {
                await JSRunner.InitializeButton(ElementRef, ElementId, PreventDefaultOnSubmit);
            });

            if (LoadingTemplate == null)
            {
                LoadingTemplate = ProvideDefaultLoadingTemplate();
            }

            base.OnInitialized();
        }