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: Loop Stops Processing Rows When Column is Missing #7365

Merged
merged 2 commits into from
Jun 25, 2024

Conversation

sokolovskiy0103
Copy link
Contributor

@sokolovskiy0103 sokolovskiy0103 commented Jun 17, 2024

This pull request fixes a bug where the loop would exit early when a column is not found, instead of continuing to the next iteration. The current implementation uses return, which stops processing further columns for the current row. This fix changes return to continue to ensure that all columns are processed correctly.

🤔Type of Request

  • Bug fix
  • New feature
  • Improvement
  • Documentation
  • Other

🔗Resolves an issue?

This bug fix ensures that all columns are processed for each row, even if a specific column is not found in the columns array. This is critical for cases where some columns may not be present but should not disrupt the processing of the remaining columns.

📝Changelog

  • Core
  • Extensions

This could lead to incomplete data formatting and potential issues in the table display. With this fix, the loop continues to process all remaining columns, providing a more robust and reliable data handling experience.

💡Example(s)?
Before:
https://live.bootstrap-table.com/code/sokolovskiy0103/17796
After:
https://live.bootstrap-table.com/code/sokolovskiy0103/17798

☑️Self Check before Merge

⚠️ Please check all items below before reviewing. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • Changelog is provided or not needed

- Replace `return` with `continue` to properly iterate over all columns
- Prevents early exit of loop when a column is missing, ensuring all columns are processed correctly
src/bootstrap-table.js Outdated Show resolved Hide resolved
@wenzhixin wenzhixin merged commit 5c1da3b into wenzhixin:develop Jun 25, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants