-
-
Notifications
You must be signed in to change notification settings - Fork 119
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
All items in grid appear highlighted after adding an item to the grid #1332
Comments
Further info, grid options are configured thus:
I wasn't sure why but |
Update:
|
A workaround here is to set the Otherwise, it seems the bug is that all other rows are highlighted, instead of the newly added row. |
We use Composite Editor mostly, and strictly in our case, for Mass Update or Mass Selection updates hence why Row Selection is required by the plugin. The row highlight after update is achieved by using SlickGrid item metadata change, it adds a CSS class named For the other styling issues you mentioned, I think it would be easier if you contribute a fix, all the Composite Editor styling should be in Slickgrid-Universal in this file Note however that I published v7.0 couple days and therefore I stopped supporting v6.x. It would be better if you migrate to v7.0, but note that it requires Angular 17 Without a full repro, it's hard to provide any help and the Example 11 is working as expected and has Cypress E2E tests so I cannot replicate without a full repro, perhaps you can test in Example 11 and provide code that fails with that demo |
I think I've discovered the source of my issue - the data are stored in the database with
I can see that |
Yeah ok, it does use |
Thanks for your quick response! For now, I think I can work around this knowing that the I'm not too familiar with the underlying APis but maybe it would be possible to store metadata somewhere else, i.e. not on the data object itself. Perhaps a separate map, rowId -> metadata? |
So I looked at possibly reimplementing the row highlight and after investigating, I decided to address the issue directly in the SlickGrid core library (because with the new major release, SlickGrid is now merged in Slickgrid-Universal). I don't want to deviate the SlickGrid core lib too much but in this case I made an exception since in SlickGrid we already have a ref (row cache) to all the currently shown Slick rows in the grid (including their HTML Node ref), since we have that I can simply add/remove CSS classes for a certain duration period and voila! At the end of it, I no longer need the use of ItemMetadata (which indirectly required to mutate the item, as you pointed out as being fragile, and also no longer need to update the item in the grid), so performance wise it should also be a lot better. I also added a new grid option So all in all, this is much better but will only be available in Angular-Slickgrid v7.x (same note as I left in the other issue, I don't want to support older versions) |
The row highlight should be a lot better with the new implementation in v7.1.0, you can see the updated demo Example 11 to test it out. |
Describe the bug
After adding a new item to the grid, all other rows of the grid appear highlighted.
Reproduction
I've reproduced this in two ways:
SlickCompositeEditorComponent
as described in documentationgridService.addItem
onAngularGridInstance
.Expectation
No rows should be highlighed after calling addItem.
Environment Info
Validations
The text was updated successfully, but these errors were encountered: