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

Select defaultValue is not working when enhanced={{renderToPortal: true}} is set #1395

Open
przystuj opened this issue Apr 18, 2024 · 2 comments · May be fixed by #1428
Open

Select defaultValue is not working when enhanced={{renderToPortal: true}} is set #1395

przystuj opened this issue Apr 18, 2024 · 2 comments · May be fixed by #1428
Assignees

Comments

@przystuj
Copy link

  • What RMWC Version are you using [major.minor.patch]: 14.2.1

  • Name your build system [Webpack, Rollup...]: pnpm with vite

  • Describe the bug with as much detail as possible:

when I add select like this:
<Select defaultValue={'Cookies'} enhanced={{ renderToPortal: true }} label="renderToPortal" options={['Cookies', 'Pizza', 'Icecream']} />
the default value is not displayed

this displays defaultValue properly:
<Select defaultValue={'Cookies'} enhanced label="enhanced" options={['Cookies', 'Pizza', 'Icecream']} />

image

@EmiBemi
Copy link
Member

EmiBemi commented May 29, 2024

After some investigation I've found that the problem is caused by the menu being rendered to a portal. More specifically the error was introduced in #850 at https://github.com/rmwc/rmwc/pull/850/files#diff-4bdf91d85ceb1e7908ff7d09a600ac02ee8287f48b7e79063155fc836ed93e27.

I will look into a solution.

@EmiBemi
Copy link
Member

EmiBemi commented May 30, 2024

PR openened (#1428)

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.

2 participants