|
|
@ -128,6 +128,7 @@ const { |
|
|
|
isViewColumnsLoading: _isViewColumnsLoading, |
|
|
|
isViewColumnsLoading: _isViewColumnsLoading, |
|
|
|
updateGridViewColumn, |
|
|
|
updateGridViewColumn, |
|
|
|
gridViewCols, |
|
|
|
gridViewCols, |
|
|
|
|
|
|
|
metaColumnById, |
|
|
|
resizingColOldWith, |
|
|
|
resizingColOldWith, |
|
|
|
} = useViewColumnsOrThrow() |
|
|
|
} = useViewColumnsOrThrow() |
|
|
|
|
|
|
|
|
|
|
@ -1102,12 +1103,33 @@ const saveOrUpdateRecords = async ( |
|
|
|
// #Grid Resize |
|
|
|
// #Grid Resize |
|
|
|
const onresize = (colID: string | undefined, event: any) => { |
|
|
|
const onresize = (colID: string | undefined, event: any) => { |
|
|
|
if (!colID) return |
|
|
|
if (!colID) return |
|
|
|
updateGridViewColumn(colID, { width: event.detail }) |
|
|
|
|
|
|
|
|
|
|
|
// Set 80px minimum width for attachment cells |
|
|
|
|
|
|
|
if (metaColumnById.value[colID].uidt === UITypes.Attachment) { |
|
|
|
|
|
|
|
const size = event.detail.split('px')[0] |
|
|
|
|
|
|
|
if (+size < 80) { |
|
|
|
|
|
|
|
updateGridViewColumn(colID, { width: '80px' }) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
updateGridViewColumn(colID, { width: event.detail }) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
updateGridViewColumn(colID, { width: event.detail }) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const onXcResizing = (cn: string | undefined, event: any) => { |
|
|
|
const onXcResizing = (cn: string | undefined, event: any) => { |
|
|
|
if (!cn) return |
|
|
|
if (!cn) return |
|
|
|
gridViewCols.value[cn].width = `${event.detail}` |
|
|
|
// Set 80px minimum width for attachment cells |
|
|
|
|
|
|
|
if (metaColumnById.value[cn].uidt === UITypes.Attachment) { |
|
|
|
|
|
|
|
const size = event.detail.split('px')[0] |
|
|
|
|
|
|
|
if (+size < 80) { |
|
|
|
|
|
|
|
gridViewCols.value[cn].width = '80px' |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
gridViewCols.value[cn].width = `${event.detail}` |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
gridViewCols.value[cn].width = `${event.detail}` |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const onXcStartResizing = (cn: string | undefined, event: any) => { |
|
|
|
const onXcStartResizing = (cn: string | undefined, event: any) => { |
|
|
|