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

Fix change visibility of multiple header with same index #7217

Merged
merged 3 commits into from
Mar 9, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix change visibility of multiple header with same index
Naruto-kyun authored Mar 7, 2024
commit 9effae07735cd1b276df761120f8170e5b19a250
9 changes: 8 additions & 1 deletion src/utils/index.js
Original file line number Diff line number Diff line change
@@ -300,7 +300,14 @@
let colspan = 0

for (let i = r.colspanIndex; i < r.colspanIndex + r.colspanGroup; i++) {
const column = allColumns.find(col => col.fieldIndex === i)
let underColumns = allColumns.filter(col => col.fieldIndex === i)

Check failure on line 303 in src/utils/index.js

GitHub Actions / test

'underColumns' is never reassigned. Use 'const' instead
const column = underColumns[underColumns.length - 1]

if(underColumns.length > 1){

Check failure on line 306 in src/utils/index.js

GitHub Actions / test

Expected space(s) after "if"

Check failure on line 306 in src/utils/index.js

GitHub Actions / test

Missing space before opening brace
for(let j = 0; j < underColumns.length - 1; j++){

Check failure on line 307 in src/utils/index.js

GitHub Actions / test

Expected space(s) after "for"

Check failure on line 307 in src/utils/index.js

GitHub Actions / test

Missing space before opening brace
underColumns[j].visible = column.visible
}
}

if (column.visible) {
colspan++