Add default props to GroupProvider

This commit is contained in:
Mitchell McCaffrey 2021-06-05 13:04:26 +10:00
parent 1a34dc756a
commit 5db2b30bc1

View File

@ -134,6 +134,13 @@ export function GroupProvider({
);
}
GroupProvider.defaultProps = {
groups: [],
onGroupsChange: () => {},
onGroupsSelect: () => {},
disabled: false,
};
export function useGroup() {
const context = useContext(GroupContext);
if (context === undefined) {