Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i.default is not a constructor #2028

Open
omsodr opened this issue Mar 15, 2024 · 0 comments
Open

i.default is not a constructor #2028

omsodr opened this issue Mar 15, 2024 · 0 comments
Labels

Comments

@omsodr
Copy link

omsodr commented Mar 15, 2024

jQuery.Deferred exception: i.default is not a constructor TypeError: i.default is not a constructor
at t.createPagination (http://localhost:8080/js/tui/tui-grid.min.js:7:333448)
at t.componentDidMount (http://localhost:8080/js/tui/tui-grid.min.js:7:332635)
at S (http://localhost:8080/js/tui/tui-grid.min.js:7:20635)
at D (http://localhost:8080/js/tui/tui-grid.min.js:7:20836)
at Module.B (http://localhost:8080/js/tui/tui-grid.min.js:7:25996)
at new e (http://localhost:8080/js/tui/tui-grid.min.js:7:189212)
at initGrid (http://localhost:8080/sample/repaireListPage.do:56:28)
at HTMLDocument. (http://localhost:8080/sample/repaireListPage.do:32:13)
at e (http://localhost:8080/js/jquery.min.js:2:27028)
at t (http://localhost:8080/js/jquery.min.js:2:27330) undefined
ce.Deferred.exceptionHook @ jquery.min.js:2
t @ jquery.min.js:2
setTimeout (async)
(anonymous) @ jquery.min.js:2
c @ jquery.min.js:2
fireWith @ jquery.min.js:2
fire @ jquery.min.js:2
c @ jquery.min.js:2
fireWith @ jquery.min.js:2
ready @ jquery.min.js:2
P @ jquery.min.js:2
jquery.min.js:2 Uncaught TypeError: i.default is not a constructor
at t.createPagination (tui-grid.min.js:7:333448)
at t.componentDidMount (tui-grid.min.js:7:332635)
at S (tui-grid.min.js:7:20635)
at D (tui-grid.min.js:7:20836)
at Module.B (tui-grid.min.js:7:25996)
at new e (tui-grid.min.js:7:189212)
at initGrid (repaireListPage.do:56:28)
at HTMLDocument. (repaireListPage.do:32:13)
at e (jquery.min.js:2:27028)
at t (jquery.min.js:2:27330)

이런 오류가 발생 하였습니다

코드는 아래와 같습니다

<script type="text/javaScript" language="javascript" > let grid ; let pagination; let currPage = 1; let firstPage = 1; let lastPage = 1; let lastNoPage = 10; $(document).ready(function(){ grid = initGrid(); }); const initGrid = () => { const Grid = tui.Grid; let params = { id:11 }; const dataSource = { api: { readData: { url: '/sample/repaireList.do', method: 'GET' }, }, contentType: 'application/json', headers: { 'x-custom-header': 'custom-header' }, serializer(params) { return Qs.stringify(params); } }; const sampleGrid = new Grid({ el: document.getElementById('grid'), data:dataSource, scrollX: false, scrollY: false, header: { height: 30 }, pageOptions: { perPage: 10 }, columns: [ // 컬럼 설정 { header: '순번', //컬럼명 name: 'rpairReinfcIdx' }, { header: '기간', name: 'de' }, { header: '구분', name: 'rpairReinfcSe' }, { header: '부위', name: 'rpairReinfcRegn' }, { header: '공사명', name: 'cstrnNm' }, { header: '설계자', name: 'dsgnr' }, { header: '공사비(천원)', name: 'cstrnCt' }, { header: '시공자', name: 'cnstrtr' }, { header: '책임기술자', name: 'rspnsblTcnxprt' }, { header: '공사감독', name: 'cstrnMangr' }, { header: '작성자', name: 'writer' } ] }); return sampleGrid; } 오류난 부분은 t.prototype.createPagination = function() { var e = this.props , t = e.pageOptions , n = e.paginationHolder , r = e.grid.usageStatistics , a = t.totalCount , l = t.perPage , s = o.__assign(o.__assign({}, t), { totalItems: a, itemsPerPage: l, usageStatistics: r }); this.tuiPagination = new i.default(this.el,s), this.addEventListener(), n.setPagination(this.tuiPagination) } 여기서 new i.default 입니다.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant