|
|
@ -76,9 +76,10 @@ class CustomRowNumberRenderer {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
getRowNum(props) {
|
|
|
|
getRowNum(props) {
|
|
|
|
const currentPage = props.grid.getPagination()._currentPage;
|
|
|
|
// paging 처리시 : scroll인 경우 제외
|
|
|
|
|
|
|
|
const currentPage = props.grid.getPagination()?._currentPage;
|
|
|
|
// You can change the number `5` as your perPage option.
|
|
|
|
// You can change the number `5` as your perPage option.
|
|
|
|
return Number(props.formattedValue) + (currentPage - 1) * props.grid.getPagination()._options.itemsPerPage;
|
|
|
|
return Number(props.formattedValue) + (currentPage - 1) * props.grid.getPagination()?._options?.itemsPerPage;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
getElement() {
|
|
|
|
getElement() {
|
|
|
@ -140,8 +141,9 @@ const TuiGrid = {
|
|
|
|
this.instance = null;
|
|
|
|
this.instance = null;
|
|
|
|
|
|
|
|
|
|
|
|
// rowNum fix
|
|
|
|
// rowNum fix
|
|
|
|
|
|
|
|
if(options.pageOptions?.type !== 'scroll') {
|
|
|
|
options.rowHeaders.filter((r, idx) => {
|
|
|
|
options.rowHeaders.filter((r, idx) => {
|
|
|
|
if(r === 'rowNum'){
|
|
|
|
if (r === 'rowNum') {
|
|
|
|
options.rowHeaders[idx] = {
|
|
|
|
options.rowHeaders[idx] = {
|
|
|
|
type: 'rowNum',
|
|
|
|
type: 'rowNum',
|
|
|
|
renderer: {
|
|
|
|
renderer: {
|
|
|
@ -150,6 +152,7 @@ const TuiGrid = {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
const newOptions = $.extend(true, {}, this.defaultOptions, options, {data: dataSource});
|
|
|
|
const newOptions = $.extend(true, {}, this.defaultOptions, options, {data: dataSource});
|
|
|
|
newOptions.el = document.getElementById(options.el);
|
|
|
|
newOptions.el = document.getElementById(options.el);
|
|
|
|
//this.elId = options.el;
|
|
|
|
//this.elId = options.el;
|
|
|
|