最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

dom events - Fix violation from the google chrome console, Angular 18 - Stack Overflow

programmeradmin6浏览0评论

I need to use only a number type in the input, Angular 18. If I try to use

  <input matInput type="number">

in google chrome I get a violation

[Violation] Added non-passive event listener to a scroll-blocking 'wheel' event. Consider marking event handler as 'passive' to make the page more responsive. 

How to remove this violation and continue to use number in this input?

Adding event listeners via ViewChild didn't help. Using [attr.type]="'number'" returns a string instead of number.

发布评论

评论列表(0)

  1. 暂无评论