1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.useTypeaheadContext = exports.TypeaheadContext = void 0;
|
7 |
|
8 | var _react = require("react");
|
9 |
|
10 | var _utils = require("../utils");
|
11 |
|
12 | var TypeaheadContext = (0, _react.createContext)({
|
13 | activeIndex: -1,
|
14 | hintText: '',
|
15 | id: '',
|
16 | initialItem: null,
|
17 | inputNode: null,
|
18 | isOnlyResult: false,
|
19 | onActiveItemChange: _utils.noop,
|
20 | onAdd: _utils.noop,
|
21 | onInitialItemChange: _utils.noop,
|
22 | onMenuItemClick: _utils.noop,
|
23 | selectHintOnEnter: undefined,
|
24 | setItem: _utils.noop
|
25 | });
|
26 | exports.TypeaheadContext = TypeaheadContext;
|
27 |
|
28 | var useTypeaheadContext = function useTypeaheadContext() {
|
29 | return (0, _react.useContext)(TypeaheadContext);
|
30 | };
|
31 |
|
32 | exports.useTypeaheadContext = useTypeaheadContext; |
\ | No newline at end of file |