diff --git a/src/main/webapp/resources/framework/js/cmm/xit-tui-grid.js b/src/main/webapp/resources/framework/js/cmm/xit-tui-grid.js index 205ee05b..de5ad0ef 100644 --- a/src/main/webapp/resources/framework/js/cmm/xit-tui-grid.js +++ b/src/main/webapp/resources/framework/js/cmm/xit-tui-grid.js @@ -76,9 +76,10 @@ class CustomRowNumberRenderer { } 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. - return Number(props.formattedValue) + (currentPage - 1) * props.grid.getPagination()._options.itemsPerPage; + return Number(props.formattedValue) + (currentPage - 1) * props.grid.getPagination()?._options?.itemsPerPage; } getElement() { @@ -140,16 +141,18 @@ const TuiGrid = { this.instance = null; // rowNum fix - options.rowHeaders.filter((r, idx) => { - if(r === 'rowNum'){ - options.rowHeaders[idx] = { - type: 'rowNum', - renderer: { - type: CustomRowNumberRenderer + if(options.pageOptions?.type !== 'scroll') { + options.rowHeaders.filter((r, idx) => { + if (r === 'rowNum') { + options.rowHeaders[idx] = { + type: 'rowNum', + renderer: { + type: CustomRowNumberRenderer + } } } - } - }) + }) + } const newOptions = $.extend(true, {}, this.defaultOptions, options, {data: dataSource}); newOptions.el = document.getElementById(options.el); //this.elId = options.el;