Version 19.1.0.59
The negative number is delete a minus when lost focus the control. If I type the minus before typing the muber it will be ok. But if I type it at the last the bug appear.
My code:
var format = "### ##0";
var decimalSeparate = ".";
var groupSeparate = " ";
var maxDigits = format.Contains(decimalSeparate) ? format.Length - format.IndexOf(decimalSeparate) - 1 : 0;
var range = Math.Pow(10, format.Remove(decimalSeparate).Remove(groupSeparate).Length - maxDigits) - 1 / Math.Pow(10, maxDigits);
var numberGroupSizes = format?.Split(decimalSeparate[0])[0].Split(groupSeparate[0]).Select(x => x.Length).Reverse().ToArray();
var s = new StackLayout { Spacing = 0 };
var n = new SfNumericTextBox
{
HeightRequest = 50,
HorizontalOptions = LayoutOptions.FillAndExpand,
TextAlignment = TextAlignment.Start,
ReturnType = ReturnType.Done,
ParserMode = Parsers.Decimal,
ClearButtonVisibility = Syncfusion.XForms.Editors.ClearButtonVisibilityMode.Never,
ValueChangeMode = ValueChangeMode.OnLostFocus,
MaximumNumberDecimalDigits = maxDigits,
FormatString = format
};
if (DeviceInfo.Platform != DevicePlatform.Android || numberGroupSizes.Length > 1)
{
n.GroupSeparatorMode = GroupSeparatorMode.Always;
n.EnableGroupSeparator = true;
}
Thank you, I hope this bug will be fix as soon as possible.
Best regard