-
-
Notifications
You must be signed in to change notification settings - Fork 533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: NumericPicker Decimal not dynamically handled #5022
Comments
Can you try with DecimalSeparator parameter? <Div Position="Position.Relative">
<NumericPicker @ref="@_picker" @bind-Value="@Value"
TValue="decimal"
Max="@Max"
Min="@Min"
Decimals="@QuantityPrecision"
Placeholder="@Placeholder"
Class="decimal-numeric-editor"
Disabled="@Disabled"
FocusIn="@FocusIn"
FocusOut="@FocusOut"
+ DecimalSeparator="."/>
<Span Class="decimal-numeric-editor-measurement" Position="Position.Absolute">@Measurement</Span>
@ValidationResults
</Div> |
Just tried, removed my component from page and put directly NumericPicker. Doesn't work
|
I'm trying the same example as you have, and it works as expected on my machine. Is there anything else in your project that might interfere? Maybe locale settings? |
So you first select NumericPicker with 0 Decimals and than change it to 2, and you can type "."? |
Here is my stripped example
I have even tried putting it all in its own component, but it is all the same. It works as expected. |
Decimals="2" |
It seems that we have disabled dynamically changing of Decimals in the code. We can try fixing it and see if the problem still persist. |
Thank you |
I'm working on this now, and it seems to be working as expected. Dynamically changing the Decimals is working. Here is my test code <Row>
<Column ColumnSize="ColumnSize.Is6.OnDesktop.Is12.OnMobile">
<Card Margin="Margin.Is4.OnY">
<CardBody>
<Slider @bind-Value="@QuantityPrecision" Min="2" Max="6" />
</CardBody>
<CardBody>
<NumericPicker @bind-Value="@Value"
TValue="decimal"
Decimals="@QuantityPrecision" />
</CardBody>
</Card>
</Column>
</Row>
@code {
int QuantityPrecision = 2;
decimal Value;
} I'm using Slider to update the Decimals value. |
This is an automated message reminding that this issue is expecting the author's answer. |
Closing because we were unable to reproduce an issue. |
Blazorise Version
1.2.3
What Blazorise provider are you running on?
None
Link to minimal reproduction, or a simple code snippet
Hello, I have similar issua as there
#1703
Is it possible now to change Decimals in NumericPicker dynamically?
Small example, component with some css that I didn't included(margin, paddings, nothing more.
Thank you
Steps to reproduce
Change QuantityPrecision property(tried even put there StateHasChanged) from 0 to 2
What is expected?
Can type '.' in NumericPicker
What is actually happening?
Data is correct, if there is 50 it will be 50.00, but I can not type '.' directly. But I can paste decimal number with dot
What browsers are you seeing the problem on?
Chrome
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: