You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to write a Higher Order Component, i need to pass all props but i've noticed that my aria attributes are lost. Then i realized every prop that i inherited via spread operator are lost.
I'll provide a simplified code example:
import{HTMLAttributes}from"react";exportdefaultfunctionWrapper(props: HTMLAttributes<HTMLElement>){return<div{...props}onClick={undefined}><div>
children
</div></div>}
Whereas this code works:
import{HTMLAttributes}from"react";exportdefaultfunctionWrapper(props: HTMLAttributes<HTMLElement>){return<div{...props}><div>
children
</div></div>}
This code also works (Children depth reduced):
import{HTMLAttributes}from"react";exportdefaultfunctionWrapper(props: HTMLAttributes<HTMLElement>){return<div{...props}>
children
</div>}
What's the expected result?
expected result
<divaria-label="xyz" style="background: red;"><div>children</div></div>
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within the next 7 days.
What version of
million
are you using?3.0.6
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
pnpm
What operating system are you using?
Windows
What browser are you using?
Chrome
Describe the Bug
I'm trying to write a Higher Order Component, i need to pass all props but i've noticed that my aria attributes are lost. Then i realized every prop that i inherited via spread operator are lost.
I'll provide a simplified code example:
Main component
This code doesn't work
Whereas this code works:
This code also works (Children depth reduced):
What's the expected result?
expected result
actual result:
Link to Minimal Reproducible Example
https://stackblitz.com/edit/vitejs-vite-mrgmv1?file=src%2FApp.jsx
Participation
The text was updated successfully, but these errors were encountered: