rtivital / mantine-v7

Mantine v7 migration
https://v7.mantine.dev
MIT License
127 stars 24 forks source link

NativeSelect have ID attribute error #9

Closed dejurin closed 1 year ago

dejurin commented 1 year ago

What package has an issue

@mantine/core

Describe the bug

Different IDs are generated on the client and server sides, and the ID is the same for all elements.

Screenshot 2023-07-21 at 20 32 59 Screenshot 2023-07-21 at 20 29 10

HTML output:

          <select class="mantine-SbVPkHB mantine-Input-input mantine-NativeSelect-input" 
data-variant="default" aria-invalid="false" aria-describedby="mantine-R3bddadkq-description" 
id="mantine-R3bddadkq-input">
            <option value="React">React</option>
            <option value="Angular">Angular</option>
            <option value="Vue">Vue</option>
          </select>

          <select class="mantine-SbVPkHB mantine-Input-input mantine-NativeSelect-input" 
data-variant="default" aria-invalid="false" aria-describedby="mantine-R5bddadkq-description"
id="mantine-R5bddadkq-input">
            <option value="React">React</option>
            <option value="Angular">Angular</option>
            <option value="Vue">Vue</option>
          </select>

          <select class="mantine-SbVPkHB mantine-Input-input mantine-NativeSelect-input" 
data-variant="default" aria-invalid="false" aria-describedby="mantine-R7bddadkq-description" 
id="mantine-R7bddadkq-input">
            <option value="React">React</option>
            <option value="Angular">Angular</option>
            <option value="Vue">Vue</option>
          </select>
"@mantine/core": "7.0.0-alpha.17",
"@mantine/hooks": "7.0.0-alpha.17",
"@next/bundle-analyzer": "^13.4.11",
"clsx": "^2.0.0",
"lodash": "^4.17.21",
"next": "13.4.11",
"next-intl": "^2.19.0",
"react": "18.2.0",
"react-dom": "18.2.0",

What version of @mantine/hooks page do you have in package.json?

7.0.0-alpha.17

If possible, please include a link to a codesandbox with the reproduced problem

https://codesandbox.io/p/github/dejurin/mantine7-nextjs/main

Do you know how to fix the issue

No

Are you willing to participate in fixing this issue and create a pull request with the fix

Yes

Possible fix

No response

dejurin commented 1 year ago

Update

Screenshot 2023-07-23 at 19 09 03

https://g3693t-3000.csb.app/grid

minleychris commented 1 year ago

I can see this on the DatePickerInput and dropdown menus too.

teh23 commented 1 year ago

I can see this on the DatePickerInput and dropdown menus too.

it was nextjs thing https://github.com/shadcn-ui/ui/issues/1023 tested on 13.4.18 works well

minleychris commented 1 year ago

Thanks, that sorted it for me!

dejurin commented 1 year ago

This problem is solved.