Skip to content

Commit

Permalink
Merge pull request #2494 from robintown/spotlight-fix
Browse files Browse the repository at this point in the history
Quick and dirty fix to spotlight reactivity
  • Loading branch information
robintown committed Jul 22, 2024
2 parents 58f274e + ea2d981 commit 35e2d2c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/grid/SpotlightExpandedLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const makeSpotlightExpandedLayout: CallLayout<

const [generation] = useReactiveState<number>(
(prev) => (prev === undefined ? 0 : prev + 1),
[width, height],
[width, height, model.spotlight],
);

const spotlightTileModel: SpotlightTileModel = useMemo(
Expand Down
2 changes: 1 addition & 1 deletion src/grid/SpotlightLandscapeLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const makeSpotlightLandscapeLayout: CallLayout<
);
const [generation] = useReactiveState<number>(
(prev) => (prev === undefined ? 0 : prev + 1),
[model.grid.length, width, height],
[model.grid.length, width, height, model.spotlight],
);

return (
Expand Down
2 changes: 1 addition & 1 deletion src/grid/SpotlightPortraitLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const makeSpotlightPortraitLayout: CallLayout<
);
const [generation] = useReactiveState<number>(
(prev) => (prev === undefined ? 0 : prev + 1),
[model.grid.length, width, height],
[model.grid.length, width, height, model.spotlight],
);

return (
Expand Down

0 comments on commit 35e2d2c

Please sign in to comment.