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

[DataGrid] Avoid excessive calling of reinitialize method in JavaScript #2403

Merged
merged 1 commit into from
Jul 18, 2024

Conversation

f4n0
Copy link
Contributor

@f4n0 f4n0 commented Jul 18, 2024

Pull Request

📖 Description

I've seen that the problem behind the strange resizing effect, is due to the JS method being initialized too many times.
I've not investigated a lot why but the method FinishCollectingColumns in FluentDataGrid.razor.cs is being executed each times a user click somewhere in the table. This will always re-execute the js method enableColumnResizing.

I've fixed the strange behavior by editing the js file in order to not re-initialize if the same grid was already initialized.

🎫 Issues

Fix #2381

👩‍💻 Reviewer Notes

📑 Test Plan

✅ Checklist

General

  • I have added tests for my changes.
  • I have tested my changes.
  • I have updated the project documentation to reflect my changes.
  • I have read the CONTRIBUTING documentation and followed the standards for this project.

Component-specific

  • I have added a new component
  • I have added Unit Tests for my new compontent
  • I have modified an existing component
  • I have validated the Unit Tests for an existing component

⏭ Next Steps

@vnbaaij vnbaaij changed the title Fix #2381 by avoid reinitialize js method [DataGrid] Avoid excessive calling of reinitialize method in JavaScript Jul 18, 2024
@vnbaaij vnbaaij added this to the v4.9.2 milestone Jul 18, 2024
@vnbaaij vnbaaij enabled auto-merge (squash) July 18, 2024 19:15
@vnbaaij vnbaaij merged commit c61a8e3 into microsoft:dev Jul 18, 2024
4 checks passed
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.

FluentDataGrid - column resizing with additional unwanted effects
2 participants