We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

When setting a value out of the range, the value set by control does not update the bound property.

I have angular number control with min and max value in strict mode =true. When setting a value out of bound, the control changes to the min or max set BUT it does not update the bound property.

I can hook up the change and update there, but this should not be needed.

Any advice?


5 Replies

MM Manuel Morales April 6, 2023 09:21 PM UTC

attaching a sample project. Type any number outside 1-10 and then check the bound value. You might want to try this several times. Control resets the value to any of the min or max but the object property is not updated.


I could not upload the whole project so, I added the important files.


Attachment: app_4b425c76.zip


UD UdhayaKumar Duraisamy Syncfusion Team April 7, 2023 12:10 PM UTC

You can try the value property instead of ngModel. We have prepared a sample and shared it below for your reference.


<ejs-numerictextbox

    id="met-threshold-yellow-1"

    name="metThresholdYellow1"

    min="1"

    max="9"

    step="1"

    format="###"

    [(value)]="myControl.value"

  >

  </ejs-numerictextbox>


Sample: https://stackblitz.com/edit/angular-veudrz?file=src%2Fapp.component.html,src%2Fapp.component.ts



MM Manuel Morales April 7, 2023 05:01 PM UTC

That indeed works. Are you guys planning on making it work wth ngModel? Which I think everybody expects. 

Thanks for the quick answer.


Best

Manuel



UD UdhayaKumar Duraisamy Syncfusion Team April 11, 2023 06:16 AM UTC

We have considered the reported issue "The NumericTextBox ngModel is not functioning correctly" as a bug from our end, and the fix for the issue will be included in any one of our upcoming releases.


You can now track the status of the feedback through the below link,

https://www.syncfusion.com/feedback/42793


Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.”



BS Buvana Sathasivam Syncfusion Team May 11, 2023 05:10 PM UTC

Hi Manuel,


We have included the fix for the issue " The NumericTextBox ngModel is not functioning correctly" with our release version 21.2.3. So please upgrade your package to the latest to resolve the issue from your end.


Sample: https://stackblitz.com/edit/angular-veudrz-n1bztw?file=src%2Fapp.component.html,package.json


Regards,

Buvana S


Loader.
Live Chat Icon For mobile
Up arrow icon