ngx-scanner icon indicating copy to clipboard operation
ngx-scanner copied to clipboard

"Setting is the same device is not allowed" not preventable

Open rala72 opened this issue 1 year ago • 0 comments

Describe the bug Once you declare the input attribute [(device)] (or [device]) you will get this warning. It is even present in your own demo page: https://zxing-js.github.io/ngx-scanner

To Reproduce Steps to reproduce the behavior:

  1. Declare component with [(device)] and create a <select> to select the device
  2. Check console

Expected behavior No warning message to tell me, that angular change detection triggered or a way to prevent it.

Currently using 17.0.4, but also many other versions are affected.
I get that the other warnings mentioned in #204 make sense, but this seems to always be happen if angular change detection triggers once.
I think Angular can handle the change detection well so I would just remove the log message,
but if there is any way to keep the warning while preventing this message from happening, it would be awesome as well.

https://github.com/zxing-js/ngx-scanner/blob/87942e553cdac2322d4ca2ec5e6f379eb4ab172d/projects/zxing-scanner/src/lib/zxing-scanner.component.ts#L215

rala72 avatar Sep 12 '24 08:09 rala72