Skip to content

Commit

Permalink
[#815][3.0] Grid 기능 추가
Browse files Browse the repository at this point in the history
#######################
- eslint 'no-param-reassign' -> 'cur' 추가
  • Loading branch information
kimyell1023 committed May 31, 2021
1 parent 25baea4 commit ea217d8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ module.exports = {
'request', // for Express requests
'res', // for Express responses
'response', // for Express responses
'cur',
],
}],
indent: 'off',
Expand Down
13 changes: 6 additions & 7 deletions src/components/grid/uses.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,16 +160,15 @@ export const resizeEvent = (params) => {
const bodyEl = elementInfo.body;
let elWidth = bodyEl.offsetWidth;
const elHeight = bodyEl.offsetHeight;
const result = stores.orderedColumns.reduce((acc, c) => {
const column = c;
if (column.hide) {
const result = stores.orderedColumns.reduce((acc, cur) => {
if (cur.hide) {
return acc;
}
if (column.field === 'db-icon' || column.field === 'user-icon') {
column.width = resizeInfo.iconWidth;
if (cur.field === 'db-icon' || cur.field === 'user-icon') {
cur.width = resizeInfo.iconWidth;
}
if (column.width) {
acc.totalWidth += column.width;
if (cur.width) {
acc.totalWidth += cur.width;
} else {
acc.emptyCount++;
}
Expand Down

0 comments on commit ea217d8

Please sign in to comment.