Flutter_Pinput icon indicating copy to clipboard operation
Flutter_Pinput copied to clipboard

Duplicate ID chrome console, cannot validate pin

Open nowackipawel opened this issue 1 year ago • 1 comments

Describe the bug I would like to use two Pinputs on one screen on WEB version of the app. However I am getting error about duplicates of element ID. As for now it looks like this cause the issue setPIN and confirmationPIN comparasion is not working for me.

To Reproduce generate webpage with 2 pinputs and check its values for being the same;

Screenshots [DOM] Found 2 elements with non-unique id #one-time-code: (More info: https://goo.gl/9p2vKq) undefined SCR-20241121-tdnx

Pinput version: [e.g. 1.0.0]

Smartphone (please complete the following information): Google chrome

nowackipawel avatar Nov 21 '24 21:11 nowackipawel

Hi @nowackipawel, could you please provide the small reproducible code snippet? I tried having to Pinputs on one page but I don't get the same issue.

Possible solutions:

  • Provide keys
  • Don't use single TextEditingController for both Pinputs.

Tkko avatar Dec 08 '24 10:12 Tkko