feat: Composite Editor should support CellSelectionModel#1990
Conversation
support the CellSelectionModel as well fixes ghiscoding#1987
When using the CellSelectionModel, calls to setActiveCell break the range of cells that the user selected. The original range now gets restored.
Added an onDispose callback that is always called when the modal is removed, unlike onClose(), which is only called if there are changes in the form.
|
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1990 +/- ##
=======================================
Coverage 100.0% 100.0%
=======================================
Files 195 195
Lines 35921 35931 +10
Branches 10648 10651 +3
=======================================
+ Hits 35921 35931 +10
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
it looks like all Cypress E2E tests are failing for all frameworks on the same Example 30 test... We also need unit test to cover the new event, you could maybe add a spy to the |
Now that the CellSelectionModel is supported in the Composite Editor, we explicitly arrange for keeping the selected range of cells as it was before the editor opened.
New test for onDispose in 4800075. E2E: removed the check on "no row selected after mass-selection" in fc28c61. |
Yeah ok I did see your change and I agree on the Mass Update to remove all selections, but I wonder if removing all the E2E tests that were previously expecting the row selection to be cleared is the correct behavior. I mean, I wonder if your change is correct or if we should rather add a new option flag for this? I'm saying this because you're changing the behavior so in theory it's a slight breaking change. @zewa666 you're also using the Composite Editor right? This PR would include a behavior change since it would now reapply the Row Selection that the user had before opening the Modal window. That's a behavior change because at the moment, when Mass Selection changes are applied and the user clicks Save, it currently clears the Row Selection... so I'm wondering if we should add a new flag to let the user decide on the behavior. What do you think? Like a below is the current behavior |
|
no we don't use the composite editor since our requirements are to show related grids, hence we went with using the column definitions and so on but building a custom form with ngxformly with those. I think the proposed change here is good, and while its a breaking change I feel like its actually more of a fix. I dont see a use case why the selection should be cleared. so I'd say its good 👍 |
|
alright thanks for the feedback, let's merge as it is then. Thanks a lot for the contribution, expect a new release over the weekend :) |



As discussed in #1987, for the Composite Editor: