Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.16.0",
"version": "1.16.1",
"description": "Supporting common component library",
"type": "module",
"main": "dist/index.js",
Expand Down
4 changes: 2 additions & 2 deletions src/Shared/Hooks/useStickyEvent/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
* limitations under the License.
*/

export const FALLBACK_SENTINEL_HEIGHT = '1px'
export const FALLBACK_SENTINEL_HEIGHT = '2px'
export const OBSERVER_THRESHOLD = 1
export const OBSERVER_ROOT_MARGIN = '0px'
export const OBSERVER_ROOT_MARGIN = '1px'
4 changes: 2 additions & 2 deletions src/Shared/Hooks/useStickyEvent/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const getHeightForStickyElementTopOffset = <T extends HTMLElement>({
const doesTopOffsetContainCalc = calcRegex.test(topValue)

if (doesTopOffsetContainCalc) {
return topValue.replace(calcRegex, (match) => `calc(${match} + 1px)`)
return topValue.replace(calcRegex, (match) => `calc(${match} + 2px)`)
}

return topValue.replace(/\d+(\.\d+)?/g, (match) => {
Expand All @@ -40,6 +40,6 @@ export const getHeightForStickyElementTopOffset = <T extends HTMLElement>({
return FALLBACK_SENTINEL_HEIGHT
}

return `${nMatch + 1}`
return `${nMatch + 2}`
})
}