UNPKG

@geezee/react-ui

Version:

Modern and minimalist React UI library.

21 lines (17 loc) 637 B
import { useRef } from 'react'; var useSelectHandle = function useSelectHandle() { var ref = useRef(null); return { setValue: function setValue() { var _ref$current; var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; return (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.setValue(value); }, getValue: function getValue() { var _ref$current2; return (_ref$current2 = ref.current) === null || _ref$current2 === void 0 ? void 0 : _ref$current2.getValue(); }, ref: ref }; }; export default useSelectHandle;