Skip to content

fix: insert new columns before actions column in stored order#139

Open
Rishavraaj wants to merge 1 commit into
mainfrom
fix/new-column-order-before-actions
Open

fix: insert new columns before actions column in stored order#139
Rishavraaj wants to merge 1 commit into
mainfrom
fix/new-column-order-before-actions

Conversation

@Rishavraaj
Copy link
Copy Markdown
Contributor

Summary

  • New columns added to companies and deals tables were appearing after the action column instead of before it
  • Root cause: useColumnOrder appends unseen columns to the end of the stored localStorage order, but actions was already at the end of that
    stored order
  • Fix: split the stored order at actions, insert new columns before it, then re-append actions last

Test plan

  • Add a new custom column to Contacts — verify it appears before the Actions column
  • Add a new custom column to Companies — verify it appears before the Actions column
  • Add a new custom column to Deals — verify it appears before the Actions column
  • Reload the page after adding a column — verify order is preserved correctly
  • Drag to reorder columns — verify Actions stays at the end and cannot be moved before data columns

When a new column was added in companies or deals, it appeared after the
actions column because localStorage had 'actions' at the end and new
columns were appended after the full stored order. Now new columns are
inserted before 'actions' so they always land in the right position.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant