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

Typecasting forwardRef inside Select #1774

Merged
merged 16 commits into from
Jan 11, 2024
Merged

Conversation

siddhantrawal
Copy link
Contributor

@siddhantrawal siddhantrawal commented Jan 8, 2024

Changes

Fixes: #1767

Added type for forwardRef inside Select and LabeledSelect component (Refer to option 1 inside this link).

Added Type checking test case for both components.

Added unit test that forwards the ref Inside the components.

For reviewing, turn off whitespace diff.

Testing

Tested locally in the Vite Playground. No longer getting the error mentioned in #1767.

Docs

Added changeset.

@siddhantrawal siddhantrawal self-assigned this Jan 8, 2024
@siddhantrawal siddhantrawal changed the title Typecasting forwardRef inside Select Typecasting forwardRef inside Select Jan 8, 2024
@siddhantrawal siddhantrawal linked an issue Jan 8, 2024 that may be closed by this pull request
@siddhantrawal siddhantrawal marked this pull request as ready for review January 9, 2024 15:02
@siddhantrawal siddhantrawal requested review from a team as code owners January 9, 2024 15:02
@siddhantrawal siddhantrawal requested review from mayank99 and r100-stack and removed request for a team January 9, 2024 15:02
Copy link
Member

@r100-stack r100-stack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No additional comments. Just found this StackOverflow answer that might be related.

Copy link
Contributor

@mayank99 mayank99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we also make ComboBox behave similarly?

@siddhantrawal
Copy link
Contributor Author

can we also make ComboBox behave similarly?

Is it okay to have a new PR for it or should I have it included in this one?

Copy link
Contributor

@mayank99 mayank99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we also make ComboBox behave similarly?

Is it okay to have a new PR for it or should I have it included in this one?

upto you, i'm fine with either

Copy link
Contributor

@mayank99 mayank99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just missing changeset

@siddhantrawal
Copy link
Contributor Author

LGTM, just missing changeset

Is the changeset okay? (9c481a7).

Copy link
Contributor

@mayank99 mayank99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action items after this PR merge:

can we also make ComboBox behave similarly?

migrate all unit tests and types tests to vitest

@siddhantrawal siddhantrawal merged commit 70428a9 into main Jan 11, 2024
16 checks passed
@siddhantrawal siddhantrawal deleted the siddhant/select_argument branch January 11, 2024 16:18
@imodeljs-admin imodeljs-admin mentioned this pull request Jan 11, 2024
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 this pull request may close these issues.

Select does not allow to specify a generic argument
3 participants