From 1e87c2fa1b4344e6ddf949f4fb6d43a0ffaa5d25 Mon Sep 17 00:00:00 2001 From: Kristin Bradley Date: Thu, 23 Jan 2025 16:24:34 -0800 Subject: [PATCH 1/2] HDS-4273 Add note to docs to set identityKey value to persist checkbox state --- .../docs/components/table/table/partials/code/how-to-use.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/website/docs/components/table/table/partials/code/how-to-use.md b/website/docs/components/table/table/partials/code/how-to-use.md index 660a007cef..9483b7e70d 100644 --- a/website/docs/components/table/table/partials/code/how-to-use.md +++ b/website/docs/components/table/table/partials/code/how-to-use.md @@ -576,7 +576,9 @@ Add `isSelectable=true` to create a multi-select table. The `onSelectionChange` #### Multi-select table using a model -This is a simple example of a table with multi-selection. Notice the `@selectionKey` argument provided to the rows, used by the `@onSelectionChange` callback to provide the list of selected/deselected rows as argument(s) for the invoked function: +This is a simple example of a table with multi-selection. Notice the `@selectionKey` argument provided to the rows, used by the `@onSelectionChange` callback to provide the list of selected/deselected rows as argument(s) for the invoked function. + +**Note:** If you want the state of the checkboxes to persist after the model updates, you will need to provide an `identityKey` value. ```handlebars Date: Fri, 24 Jan 2025 09:47:00 -0800 Subject: [PATCH 2/2] HDS-4273 Add Info box around text --- .../docs/components/table/table/partials/code/how-to-use.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/website/docs/components/table/table/partials/code/how-to-use.md b/website/docs/components/table/table/partials/code/how-to-use.md index 9483b7e70d..13acbc6848 100644 --- a/website/docs/components/table/table/partials/code/how-to-use.md +++ b/website/docs/components/table/table/partials/code/how-to-use.md @@ -578,7 +578,11 @@ Add `isSelectable=true` to create a multi-select table. The `onSelectionChange` This is a simple example of a table with multi-selection. Notice the `@selectionKey` argument provided to the rows, used by the `@onSelectionChange` callback to provide the list of selected/deselected rows as argument(s) for the invoked function. -**Note:** If you want the state of the checkboxes to persist after the model updates, you will need to provide an `identityKey` value. +!!! Info + +If you want the state of the checkboxes to persist after the model updates, you will need to provide an `identityKey` value. + +!!! ```handlebars