fix: Loop Stops Processing Rows When Column is Missing #7365
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
🔗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
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