@adaptabletools/adaptable
Version:
Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements
15 lines (14 loc) • 403 B
JavaScript
const selector = [
'input:not([disabled])',
'textarea:not([disabled])',
'select:not([disabled])',
'[tabindex]:not([disabled])',
'a[href]',
'button:not([disabled])',
'object',
].join(', ');
export default (node) => {
const children = [...node.querySelectorAll(selector)];
// ensure they are all in the dom
return children.filter((child) => child.offsetParent);
};