Skip to content

PM-1315 Fix issues on Copilot request form#1141

Merged
kkartunov merged 1 commit intodevfrom
PM-1315
Jul 21, 2025
Merged

PM-1315 Fix issues on Copilot request form#1141
kkartunov merged 1 commit intodevfrom
PM-1315

Conversation

@himaniraghav3
Copy link
Collaborator

Related JIRA Ticket:

https://topcoder.atlassian.net/browse/PM-1315

What's in this PR?

Fixes border color on hover for Skills input
Allows backspace to clear the project input
Fixes space in text for Hi, user!


// throw the proper event type to the form handler (needs name & form element on target)
function handleSelect(option: unknown): void {
const selectedOption = option as InputSelectOption | null

Choose a reason for hiding this comment

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

Consider adding a type guard or checking if option is of type InputSelectOption before casting. This will ensure type safety and prevent potential runtime errors if option is not of the expected type.

form: findParentFrom(wrapRef.current as HTMLDivElement),
name: props.name,
value: (option as InputSelectOption).value,
value: selectedOption?.value || '',

Choose a reason for hiding this comment

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

The use of optional chaining (?.) is a good approach to handle potential null or undefined values. However, ensure that selectedOption is always of type InputSelectOption | null to avoid unexpected behavior.

@kkartunov kkartunov merged commit 077ba3b into dev Jul 21, 2025
3 checks passed
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.

2 participants