-
Notifications
You must be signed in to change notification settings - Fork 4
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
Cannot use IntelliSense for Select component #290
Comments
This issue applies to all. It is quite hard to use components when you do not have the type. You are quite forced to use documentation for such components. |
Can you see the properties of such a component? IntelliSense gives |
Looks like we can improve this by specifying return types for const ForwardedSelect = forwardRef(Select) as (
props: SelectProps & RefAttributes<SelectElement>,
) => ReactElement | null; I'll test if this works for all components that use the same approach and then create a PR. |
Thanks, @web-padawan 🙇 It would increase the usability of components significantly, in my opinion. |
@abdullahtellioglu What version of IntelliJ do you have? I was able to reproduce the issue was there with IntelliJ 2023.3.8, however after upgrading to 2024.3.1.1 the problem is gone: |
I have 2024.1 version. Let me upgrade it and check it 👍 |
Describe the bug
Select component type seems like
ForwardRefExoticComponent<unknown>
where properties are not accessible through IntelliSense. IntelliSense works for other components such as NumberField, TextField but does not for some.TextField example:
Select example:
Expected-behavior
Props should be defined for Select component.
Reproduction
Any react component with Select would work.
System Info
Hilla: 24.7.0.alpha5
Flow: 24.7.0.alpha4
Vaadin: 24.7.0.alpha3
Copilot: 24.7-SNAPSHOT
Frontend Hotswap: Enabled, using Vite
OS: aarch64 Mac OS X 14.7.1
Java: JetBrains s.r.o. 21.0.5
Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Java Hotswap: Java Hotswap is enabled
IDE Plugin: 1.0-SNAPSHOT IntelliJ
The text was updated successfully, but these errors were encountered: