Pass selection to grid tile actions

This commit is contained in:
Dylan M. Taylor committed 2026-11-21 13:06:53 -05:00
1 parent 71896a0852
commit 35dfd1fe90
1 file changed
+1 -1
+1 -1
View File
@@ -996,7 +996,7 @@ impl<K: Clone + Eq + Hash + Send + Sync + 'static> Collection for TileGrid<'_, K
/// Every tile gets the grid's caption place, detail line and actions' place, the card look, and its row's rename
/// state. Under `checks` a tile's check is its own selection, so the app keeps no second copy of it.
fn dress<'r>(&self, tile: Self::Item<'r>, row: &RowState) -> Self::Item<'r> {
let tile = tile.caption(self.caption).detail_line(self.detail_line).action_place(self.action_place).renaming(row.renaming);
let tile = tile.caption(self.caption).detail_line(self.detail_line).action_place(self.action_place).renaming(row.renaming).selected(row.selected);
let tile = if self.checks { tile.check(if row.selected { ToggleState::On } else { ToggleState::Off }) } else { tile };
if self.card { tile.card() } else { tile }
}