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

[core] Add comment on why logic to sync column header #13248

Merged
merged 1 commit into from
May 27, 2024

Conversation

oliviertassinari
Copy link
Member

As part of my due diligence on https://app.ashbyhq.com/jobs/c86e52ce-0f3b-41cd-871b-5a7fd4044238/candidate-pipeline/active/right-side/candidates/9f3a6ab2-c71b-4b25-a92b-3996f1d04647/applications/ed537f84-6d1b-4efc-b788-a29fa6c7a081/emails. I looked at #12863. I wanted to better understand how the changes connect to the rest of the codebase.

I have added comments to explain why this much complexity.

It would be possible to cheat this, meaning working around https://codesandbox.io/p/sandbox/style-sync-np6fdh?file=%2Fsrc%2FApp.js%3A5%2C30, but it would mean adding some randomness to the width, hacky 😄

@oliviertassinari oliviertassinari added core Infrastructure work going on behind the scenes component: data grid This is the name of the generic UI component, not the React module! labels May 25, 2024
const fieldsString = colCellEl.getAttribute('data-fields');
return fieldsString?.startsWith('|-') ? fieldsString!.slice(2, -2).split('-|-') : [];
return colCellEl.getAttribute('data-fields')!.slice(2, -2).split('-|-');
Copy link
Member Author

Choose a reason for hiding this comment

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

I imagine we don't need defensive logic here

@oliviertassinari oliviertassinari merged commit d7d1cfd into master May 27, 2024
19 checks passed
@oliviertassinari oliviertassinari deleted the 12290-comment branch May 27, 2024 11:43
DungTiger pushed a commit to DungTiger/mui-x that referenced this pull request Jul 23, 2024
thomasmoon pushed a commit to thomasmoon/mui-x that referenced this pull request Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: data grid This is the name of the generic UI component, not the React module! core Infrastructure work going on behind the scenes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants