-
-
Notifications
You must be signed in to change notification settings - Fork 118
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
Detail row content is cleared when the grid columns are changed #1476
Comments
Yeah Row Detail is a very special thing, every time the grid UI changes it has to call the this.gridOptions = {
columnPicker: {
onColumnsChanged: (_e, args) => rowDetailInstance.redrawAllViewComponents()
},
gridMenu: {
onColumnsChanged: (_e, args) => rowDetailInstance.redrawAllViewComponents()
},
} Angular-Slickgrid/src/app/modules/angular-slickgrid/extensions/slickRowDetailView.ts Lines 205 to 212 in f9a96bf
A PR fix would be welcome, I'm assuming something like this should fix the issue (unit tests would also need to be updated) this._subscriptions.push(
this.eventPubSubService?.subscribe('onFilterChanged', this.redrawAllViewComponents.bind(this)),
+ this.eventPubSubService?.subscribe('onGridMenuColumnsChanged', this.redrawAllViewComponents.bind(this)),
+ this.eventPubSubService?.subscribe('onColumnPickerColumnsChanged', this.redrawAllViewComponents.bind(this)),
this.eventPubSubService?.subscribe('onGridMenuClearAllFilters', () => window.setTimeout(() => this.redrawAllViewComponents())),
this.eventPubSubService?.subscribe('onGridMenuClearAllSorting', () => window.setTimeout(() => this.redrawAllViewComponents())),
); This Row Detail really has to be redrawn every time the UI changes and it happens so, so many times, I'm sure that there's even more events that are missed. |
Thank you for the solution, I hadn't gotten around to creating a PR myself yet. |
no problem, I actually wanted to test with the |
Describe the bug
In a grid with detail row functionality it is possible to expand the detail row.
The content in the detail area of the row is shown based on the data of the row.
However the content is no longer displayed when the columns of the grid are changed.
Reproduction
Expectation
The content of the detail row should remain visible when the columns of the grid are changed.
Environment Info
Validations
The text was updated successfully, but these errors were encountered: