Skip to content

Commit

Permalink
fix: isUnselectable prop issue in form component
Browse files Browse the repository at this point in the history
affects: @medly-components/core
  • Loading branch information
gmukul01 committed Apr 28, 2024
1 parent 51cbc1c commit deedabe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/components/SingleSelect/SingleSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const Component: FC<SingleSelectProps> = memo(
inputRef.current?.focus();
}
},
[inputRef.current, value, options, onChange]
[inputRef.current, isUnselectable, value, options, onChange]
),
handleOuterClick = useCallback(() => {
isFocused.current = false;
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/TextField/getMaskedValue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const applyMasking = (value: string, mask: string, selectionStart: number): stri
} else if (
specialCharsRegex.test(mask.charAt(selectionStart)) &&
!specialCharsRegex.test(mask.charAt(selectionStart + 1)) &&
mask.slice(0, selectionStart).replace(/[^a-zA-Z0-9]+$/, '').length === length
mask.slice(0, selectionStart).replace(/[^a-zA-Z0-9]+$/, '').length === length //NOSONAR
) {
// if user deletes the last special character
newValue = value;
Expand Down

0 comments on commit deedabe

Please sign in to comment.