Skip to content

Commit

Permalink
fix: Add missing setVirtual action to CompositeState reducer
Browse files Browse the repository at this point in the history
  • Loading branch information
diegohaz committed Apr 16, 2020
1 parent f548b48 commit 965704c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/reakit/src/Composite/CompositeState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ function reducer(
action: CompositeReducerAction
): CompositeReducerState {
const {
unstable_virtual: virtual,
rtl,
orientation,
items,
Expand Down Expand Up @@ -524,6 +525,11 @@ function reducer(
);
return { ...nextState, items };
}
case "setVirtual":
return {
...state,
unstable_virtual: applyState(action.virtual, virtual),
};
case "setRTL":
return { ...state, rtl: applyState(action.rtl, rtl) };
case "setOrientation":
Expand Down

0 comments on commit 965704c

Please sign in to comment.