kibana/examples/grid_example/public
Hannah Mudge b32f0fe1e8
[kbn-grid-layout] Store rows in object instead of array (#212965)
Closes https://github.com/elastic/kibana/issues/211930

## Summary

This PR makes it so that `kbn-grid-layout` stores its rows as an object
/ dictionary (`{ [key: string]: GridRowData }`) rather than an array
(`Array<GridRowData>`). This is a prerequisite for
https://github.com/elastic/kibana/issues/190381 , since it allows us to
re-order rows without re-rendering their contents. It also means that
deleting a row will no longer cause the rows below it to re-render,
since re-rendering is now dependant on the row's **ID** rather than the
row's order.

**Before**


https://github.com/user-attachments/assets/83651b24-a32c-4953-8ad5-c0eced163eb5


**After**


https://github.com/user-attachments/assets/9cef6dbc-3d62-46aa-bc40-ab24fc4e5556


### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-04 13:34:39 -07:00
..
app.tsx [kbn-grid-layout] Store rows in object instead of array (#212965) 2025-03-04 13:34:39 -07:00
get_panel_id.tsx Preparation for High Contrast Mode, Analytics Experience domains (#202608) 2024-12-12 13:16:07 -06:00
grid_layout_options.tsx [kbn-grid-layout] Add ability to create, edit, and delete rows (#209193) 2025-02-24 18:29:00 +00:00
index.ts Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
logs_dashboard_panels.json [kbn-grid-layout] Store rows in object instead of array (#212965) 2025-03-04 13:34:39 -07:00
plugin.ts [Dashboard] [Collapsable Panels] Add embeddable support (#198413) 2024-12-10 11:14:31 -06:00
serialized_grid_layout.ts [kbn-grid-layout] Store rows in object instead of array (#212965) 2025-03-04 13:34:39 -07:00
types.ts [kbn-grid-layout] Store rows in object instead of array (#212965) 2025-03-04 13:34:39 -07:00
use_mock_dashboard_api.tsx [kbn-grid-layout] Store rows in object instead of array (#212965) 2025-03-04 13:34:39 -07:00
utils.ts [kbn-grid-layout] Store rows in object instead of array (#212965) 2025-03-04 13:34:39 -07:00