|
@@ -10,18 +10,22 @@ type Props = {
|
|
|
};
|
|
|
|
|
|
const HeaderTh: FC<Props> = function ({header, useDiv}) {
|
|
|
+ const {fixed, disabledSort} = header.column.columnDef.meta as {
|
|
|
+ fixed: boolean;
|
|
|
+ disabledSort: boolean;
|
|
|
+ };
|
|
|
+
|
|
|
const {setNodeRef, attributes, listeners} = useSortable({
|
|
|
id: header.id,
|
|
|
data: {header},
|
|
|
- disabled: header.id === 'id',
|
|
|
+ disabled: disabledSort,
|
|
|
});
|
|
|
|
|
|
- const {fixed} = header.column.columnDef.meta as {fixed: boolean};
|
|
|
const isResizing = header.column.getIsResizing();
|
|
|
|
|
|
const style: CSSProperties = {
|
|
|
width: `${header.getSize()}px !important`,
|
|
|
- cursor: isResizing ? 'col-resize' : fixed ? 'auto' : 'move',
|
|
|
+ cursor: isResizing ? 'col-resize' : disabledSort ? 'auto' : 'move',
|
|
|
boxShadow: useDiv
|
|
|
? '0.5px 0.6px 12.3px rgba(0, 0, 0, 0.059),4px 5px 80px rgba(0, 0, 0, 0.1)'
|
|
|
: '',
|