@amblines/react-table-filter
Version:
> Module creates Excel like Column Filters for Table. The filter list contains all the unique items present in every column. See image below for example.
14 lines (12 loc) • 420 B
JavaScript
/**
* Normalizes `target` for EventStack, because `target` can be passed as `boolean` or `string`.
*
* @param {boolean|string|HTMLElement|Window} target Value for normalization.
* @return {HTMLElement|Window} A DOM node.
*/
const normalizeTarget = (target) => {
if (target === 'document') return document;
if (target === 'window') return window;
return target || document;
};
export default normalizeTarget;