From 5db2b30bc1f32bacdeda3ff603fdbbf42091c9fb Mon Sep 17 00:00:00 2001 From: Mitchell McCaffrey Date: Sat, 5 Jun 2021 13:04:26 +1000 Subject: [PATCH] Add default props to GroupProvider --- src/contexts/GroupContext.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/contexts/GroupContext.js b/src/contexts/GroupContext.js index b414e75..e414090 100644 --- a/src/contexts/GroupContext.js +++ b/src/contexts/GroupContext.js @@ -134,6 +134,13 @@ export function GroupProvider({ ); } +GroupProvider.defaultProps = { + groups: [], + onGroupsChange: () => {}, + onGroupsSelect: () => {}, + disabled: false, +}; + export function useGroup() { const context = useContext(GroupContext); if (context === undefined) {