Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:devtron-labs/devtron-fe-common-l…
Browse files Browse the repository at this point in the history
…ib into chore/rc-23-dev-sync
  • Loading branch information
eshankvaish committed Nov 21, 2024
2 parents 3a0609c + ee068a0 commit 24d5421
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@devtron-labs/devtron-fe-common-lib",
"version": "1.1.0",
"version": "1.1.1",
"description": "Supporting common component library",
"type": "module",
"main": "dist/index.js",
Expand Down
10 changes: 7 additions & 3 deletions src/Common/CustomInput/CustomInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,13 @@ export const CustomInput = ({
const handleOnBlur = (event) => {
// NOTE: This is to prevent the input from being trimmed when the user do not want to trim the input
if (!noTrim) {
event.stopPropagation()
event.target.value = event.target.value?.trim()
onChange(event)
const trimmedValue = event.target.value?.trim()

if (event.target.value !== trimmedValue) {
event.stopPropagation()
event.target.value = trimmedValue
onChange(event)
}
}
if (typeof onBlur === 'function') {
onBlur(event)
Expand Down

0 comments on commit 24d5421

Please sign in to comment.