Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
feat(core): remove statusContext API (#350)
  • Loading branch information
francoischalifour committed Oct 29, 2020
1 parent 6c03d8d commit a916aea
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 7 deletions.
1 change: 0 additions & 1 deletion packages/autocomplete-core/src/getDefaultProps.ts
Expand Up @@ -38,7 +38,6 @@ export function getDefaultProps<TItem>(
collections: [],
isOpen: false,
status: 'idle',
statusContext: {},
context: {},
...props.initialState,
},
Expand Down
3 changes: 0 additions & 3 deletions packages/autocomplete-core/src/stateReducer.ts
Expand Up @@ -84,7 +84,6 @@ export const stateReducer: Reducer = (state, action) => {
...state,
query: '',
status: 'idle',
statusContext: {},
collections: [],
};
}
Expand All @@ -95,7 +94,6 @@ export const stateReducer: Reducer = (state, action) => {
selectedItemId: null,
isOpen: false,
status: 'idle',
statusContext: {},
};
}

Expand All @@ -113,7 +111,6 @@ export const stateReducer: Reducer = (state, action) => {
: null,
isOpen: action.props.openOnFocus, // @TODO: Check with UX team if we want to close the menu on reset.
status: 'idle',
statusContext: {},
query: '',
};
}
Expand Down
3 changes: 0 additions & 3 deletions packages/autocomplete-core/src/types/state.ts
Expand Up @@ -7,8 +7,5 @@ export interface AutocompleteState<TItem> {
collections: Array<AutocompleteCollection<TItem>>;
isOpen: boolean;
status: 'idle' | 'loading' | 'stalled' | 'error';
statusContext: {
error?: Error;
};
context: { [key: string]: unknown };
}

0 comments on commit a916aea

Please sign in to comment.