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 #2615 - allow special characters in dash-table column IDs #2619

Merged
merged 3 commits into from
Aug 14, 2023

Conversation

alexcjohnson
Copy link
Collaborator

@alexcjohnson alexcjohnson commented Aug 12, 2023

Setting these characters in the DOM attribute is OK, but they need to be escaped in querySelector.

Contributor Checklist

  • I have run the tests locally and they passed. (refer to testing section in contributing)
  • I have added tests, or extended existing tests, to cover any new features or bugs fixed in this PR
  • I have added entry in the CHANGELOG.md

active_cell.row
}"][data-dash-column="${CSS.escape(
active_cell.column_id
)}"]:not(.phantom-cell)`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That became a bit harder to read on multiple line, I would destructure the active_cell and put the escaped column id in a variable.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dunno if it's net easier to read or not, but I DRYed this in 3391ee9

Copy link
Contributor

@T4rk1n T4rk1n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💃

@alexcjohnson alexcjohnson merged commit df75c87 into dev Aug 14, 2023
1 check passed
@alexcjohnson alexcjohnson deleted the table-escape-col-ids branch August 14, 2023 17:03
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.

2 participants