axisj icon indicating copy to clipboard operation
axisj copied to clipboard

AXGrid 전체 데이터 수가 변경되는 현상 (브라우저 크기 조절 시)

Open minami87 opened this issue 9 years ago • 1 comments

브라우저의 크기를 늘이거나 줄이는 동작을 취하였을 때, Grid 우측 하단에 출력되는 데이터의 수 (counts)가 10으로 변경됩니다.

첨부해드린 이미지와 같이 최초 loading시에는 79count(s) 출력되었다가 브라우저의 좌우 크기를 변경하는 동작을 하게되면 10count(s)로 변경됩니다.

아래와 같은 스크립트를 통해 목록을 그립니다.

var fnObj = {
            pageStart: function(){
                fnObj.grid.init();
            },
            grid : {
                init : function() {
                myGrid.setConfig({
                        targetID: "AXGridTarget",
                        theme: "AXGrid",
                        height: "auto",
                        sort: true,
                        fitToWidth: true,
                        emptyListMSG:"<spring:message code="COM-MSG-EMPTY_LIST"/>",
                        colGroup: [
                            //출력되는 데이터 
                        ],
                        body: {
                               //클릭시 페이지 이동
                        },
                        page : {
                             paging : true,
                             pageNo : 1,
                             pageSize : 10
                        }
                    });
                    fnObj.search();
                }
            },
           search: function(){
                var pars = $(document.form).serialize();
                myGrid.setList({
                    ajaxUrl: site.conf.contextPath + myUri + "getData.json",
                    ajaxPars: pars
                });
                return;
            }
}

default default

minami87 avatar Aug 29 '16 05:08 minami87

AXJ.min.js 파일에서

if("undefined"!=typeof listLength)listCount=listLength; 이 부분을 찾아서

if("undefined"!=typeof listLength)listCount=this.page.listCount;

변경을 하시면 됩니다.

kelon7 avatar Oct 06 '16 06:10 kelon7