UNPKG

@talend/react-components

Version:
19 lines (18 loc) 493 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = focusOnTime; /** * Focus management on time picker. * - try to focus on the selected item * - try to focus on the 1st item */ function focusOnTime(containerRef) { let target = containerRef.querySelector('button[aria-current="time"]'); if (!target) { target = containerRef.querySelector('button[role="listitem"]'); } target.focus(); } //# sourceMappingURL=timePickerGesture.js.map