File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "name" : " @devtron-labs/devtron-fe-common-lib" ,
3- "version" : " 1.22.8-beta-15 " ,
3+ "version" : " 1.22.8-beta-16 " ,
44 "description" : " Supporting common component library" ,
55 "type" : " module" ,
66 "main" : " dist/index.js" ,
Original file line number Diff line number Diff line change 1414 * limitations under the License.
1515 */
1616
17+ import { useRef } from 'react'
1718import Draggable , { DraggableProps } from 'react-draggable'
1819
1920import { ReactComponent as SortIcon } from '@Icons/ic-arrow-up-down.svg'
@@ -69,6 +70,7 @@ const SortableTableHeaderCell = ({
6970 handleResize,
7071 isResizable,
7172} : SortableTableHeaderCellProps ) => {
73+ const nodeRef = useRef < HTMLDivElement > ( null )
7274 const isCellResizable = ! ! ( isResizable && id && handleResize )
7375
7476 const renderSortIcon = ( ) => {
@@ -113,6 +115,7 @@ const SortableTableHeaderCell = ({
113115 </ button >
114116 { isCellResizable && (
115117 < Draggable
118+ nodeRef = { nodeRef }
116119 handle = ".sortable-table-header__resize-btn"
117120 defaultClassNameDragging = "sortable-table-header__resize-btn--dragging"
118121 position = { {
@@ -126,7 +129,10 @@ const SortableTableHeaderCell = ({
126129 bottom : 0 ,
127130 } }
128131 >
129- < div className = "sortable-table-header__resize-btn flex h-100 dc__no-shrink px-2 dc__position-abs dc__cursor-col-resize dc__right-3--neg" >
132+ < div
133+ ref = { nodeRef }
134+ className = "sortable-table-header__resize-btn flex h-100 dc__no-shrink px-2 dc__position-abs dc__cursor-col-resize dc__right-3--neg"
135+ >
130136 < div className = "dc__divider h-16" />
131137 </ div >
132138 </ Draggable >
You can’t perform that action at this time.
0 commit comments