Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TextArea with useId causes duplicate ID #2764

Closed
NerdCowboy opened this issue Jul 2, 2024 · 4 comments · Fixed by #2917
Closed

TextArea with useId causes duplicate ID #2764

NerdCowboy opened this issue Jul 2, 2024 · 4 comments · Fixed by #2917

Comments

@NerdCowboy
Copy link

Current Behavior

When using the id from React's useId on the Textarea component, it triggers a duplicate ID error.
IMG_D0A7EEC8E1AC-1

It's worth noting this only seems to happen with the TextArea component.

i.e.

export function Screen() {
  const id = useId()

  return (
    <TextArea id={id} placeholder="Duplicate ID here" />
  )
}

Expected Behavior

To be able to use TextArea without a duplicate ID error

Tamagui Version

1.101.5

Platform (Web, iOS, Android)

only tested iOS

Reproduction

https://github.com/NerdCowboy/tamagui-textarea-bug

System Info

System:
    OS: macOS 14.5
    CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
    Memory: 5.36 GB / 64.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 15.0.0 - ~/.nvm/versions/node/v15.0.0/bin/node
    npm: 7.24.2 - ~/.nvm/versions/node/v15.0.0/bin/npm
    Watchman: 2024.05.06.00 - /usr/local/bin/watchman
  Browsers:
    Brave Browser: 110.1.48.171
    Chrome: 126.0.6478.127
    Safari: 17.5
  npmPackages:
    @babel/runtime: ^7.24.6 => 7.24.6
    @manypkg/cli: ^0.21.4 => 0.21.4
    check-dependency-version-consistency: ^4.1.0 => 4.1.0
    eslint: ^9.3.0 => 9.4.0
    node-gyp: ^10.1.0 => 10.1.0
    prettier: ^3.2.5 => 3.3.0
    turbo: ^1.13.3 => 1.13.4
    typescript: ^5.4.5 => 5.4.5
@Cauafernandes
Copy link

Has anyone resolved this problem?

I'm experiencing the same error.

@enrtrav
Copy link

enrtrav commented Aug 13, 2024

Same issue here with tamagui v1.108.2

@dBianchii
Copy link
Contributor

Same for me

@dBianchii
Copy link
Contributor

I created a PR: #2917

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants