Skip to content

fix: use CSV header to resolve column indices dynamically - #128

Open
ChandelAnushka wants to merge 1 commit into
drkrillo:mainfrom
ChandelAnushka:fix/dynamic-column-lookup
Open

fix: use CSV header to resolve column indices dynamically#128
ChandelAnushka wants to merge 1 commit into
drkrillo:mainfrom
ChandelAnushka:fix/dynamic-column-lookup

Conversation

@ChandelAnushka

Copy link
Copy Markdown

What does this PR do?

This PR replaces hardcoded CSV column indexes (e.g. row[1]) with dynamic lookups based on the header row.

The getColumnIndex helper resolves the position of "language" and "comments" at runtime, so filtering & sorting will not break silently if the CSV column order changes.

These references are updated:

  • the language filter,
  • both comment sort comparisons,
  • and the language dropdown population.

Related Issue

Fixes #108

Checklist

  • I read the CONTRIBUTING.md
  • I ran the project locally and tested my changes
  • I verified my changes are working as expected
  • This PR description is written by me, not by AI

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.

[FIX]: Use column names instead of hardcoded indexes for filtering and sorting in frontend

2 participants