Exemplo n.º 1
0
        protected override async Task OnFirstAfterRenderAsync()
        {
            dotNetObjectRef = dotNetObjectRef ?? JSRunner.CreateDotNetObjectRef(new NumericEditAdapter(this));
            await JSRunner.InitializeNumericEdit(dotNetObjectRef, ElementId, ElementRef, Decimals, DecimalsSeparator, Step);

            await base.OnFirstAfterRenderAsync();
        }
Exemplo n.º 2
0
        /// <inheritdoc/>
        protected override async Task OnFirstAfterRenderAsync()
        {
            dotNetObjectRef ??= CreateDotNetObjectRef(new NumericEditAdapter(this));

            // find the min and max possible value based on the supplied value type
            var(minFromType, maxFromType) = Converters.GetMinMaxValueOfType <TValue>();

            await JSRunner.InitializeNumericEdit <TValue>(dotNetObjectRef, ElementRef, ElementId, new
            {
                Decimals,
                Separator = DecimalsSeparator,
                Step,
                Min = Min.IsEqual(default) ? minFromType : Min,