Fix broken UI package build (#1990)
* Use path instead of alias * Add missing pacakges * Use path in viewers * Use path in contextProviders * Add base to config * Add conditionals for window * Copy config to avoid breaking build * Update and lock versions * Update lock file * Remove scaling config * Fix broken versions of react date * Fix broken dev
This commit is contained in:
1 parent
e04f74499f
commit
ef163cd702
93 files changed
+3244
-297
No files matched your search
@@ -2,13 +2,22 @@ export default (element, onClickOutside) => {
|
||||
const clickOutsideHandler = event => {
|
||||
if (element.current && !element.current.contains(event.target)) {
|
||||
onClickOutside();
|
||||
window.removeEventListener('mousedown', clickOutsideHandler);
|
||||
if (typeof window !== 'undefined') {
|
||||
window.removeEventListener('mousedown', clickOutsideHandler);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const add = () => window.addEventListener('mousedown', clickOutsideHandler);
|
||||
const remove = () =>
|
||||
window.removeEventListener('mousedown', clickOutsideHandler);
|
||||
const add = () => {
|
||||
if (typeof window !== 'undefined') {
|
||||
window.addEventListener('mousedown', clickOutsideHandler);
|
||||
}
|
||||
};
|
||||
const remove = () => {
|
||||
if (typeof window !== 'undefined') {
|
||||
window.removeEventListener('mousedown', clickOutsideHandler);
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
add,
|
||||
|
||||
Reference in new issue
Block a user