Skip to content

Commit 0a17867

Browse files
committed
Merge branch 'develop' of github.com:devtron-labs/devtron-fe-common-lib into feat/react-diff-viewer
2 parents 5b1f1c2 + 6ac8369 commit 0a17867

File tree

5 files changed

+14
-6
lines changed

5 files changed

+14
-6
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devtron-labs/devtron-fe-common-lib",
3-
"version": "1.0.9-beta-4",
3+
"version": "1.1.3",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",

src/Common/CustomInput/CustomInput.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,13 @@ export const CustomInput = ({
6969
const handleOnBlur = (event) => {
7070
// NOTE: This is to prevent the input from being trimmed when the user do not want to trim the input
7171
if (!noTrim) {
72-
event.stopPropagation()
73-
event.target.value = event.target.value?.trim()
74-
onChange(event)
72+
const trimmedValue = event.target.value?.trim()
73+
74+
if (event.target.value !== trimmedValue) {
75+
event.stopPropagation()
76+
event.target.value = trimmedValue
77+
onChange(event)
78+
}
7579
}
7680
if (typeof onBlur === 'function') {
7781
onBlur(event)

src/Common/Hooks/UseRegisterShortcut/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export const KEYBOARD_KEYS_MAP = {
2121
Shift: '⇧',
2222
Meta: IS_PLATFORM_MAC_OS ? '⌘' : 'Win',
2323
Alt: IS_PLATFORM_MAC_OS ? '⌥' : 'Alt',
24+
Escape: 'Escape',
2425
F: 'F',
2526
E: 'E',
2627
R: 'R',

src/Common/Hooks/useUrlFilters/useUrlFilters.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,9 @@ const useUrlFilters = <T = string, K = unknown>({
161161
}
162162

163163
useEffect(() => {
164+
if (!localStorageKey) {
165+
return
166+
}
164167
// if we have search string, set secondary params in local storage accordingly
165168
if (location.search) {
166169
setItemInLocalStorageIfKeyExists(localStorageKey, JSON.stringify(parsedParams))

0 commit comments

Comments
 (0)