Skip to content

fix(fuselage): Remove unsafe type casts in Select components#1895

Open
Harshit2405-2004 wants to merge 2 commits intoRocketChat:mainfrom
Harshit2405-2004:fix/select-type-safety
Open

fix(fuselage): Remove unsafe type casts in Select components#1895
Harshit2405-2004 wants to merge 2 commits intoRocketChat:mainfrom
Harshit2405-2004:fix/select-type-safety

Conversation

@Harshit2405-2004
Copy link
Contributor

@Harshit2405-2004 Harshit2405-2004 commented Mar 6, 2026

What does this PR do?

Removes unsafe type casts (onChange(value as SelectOption[0])) in SelectLegacy and PaginatedSelect.

Motivation

Unsafe type casts hide potential type mismatches.

Changes Made

  • Removed the typecast and widened SelectOption to accept string | number properly.

@changeset-bot
Copy link

changeset-bot bot commented Mar 6, 2026

🦋 Changeset detected

Latest commit: 71f8867

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@rocket.chat/fuselage Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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.

1 participant