Skip to content

Conversation

@dgavini
Copy link

@dgavini dgavini commented Mar 31, 2025

Fixed the existing bugs in CTIMSInputWithExcludeToiggle Component

@dgavini dgavini requested review from jagnathan and mickey-ng March 31, 2025 17:46
) => {
const newValue = event.target.value.trim();
if (newValue.startsWith('!') && value?.startsWith('!')) {
setValueState(newValue.replace(/^!/, ''));
Copy link
Collaborator

Choose a reason for hiding this comment

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

onChange is only called in the else case, if you do this sequence:

  1. enter "!abc"
  2. setValues changes to "abc"
  3. toggle back to inclusion
  4. enter "!" in front of "abc" again, it won't enter onChange right?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I see this is only used in the dropdown, would there be a case where it starts with "!"?

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