Skip to content

πŸ”₯ πŸ”₯ πŸ”₯ A Free & Self-hostable Airtable Alternative

fix(nc-gui): update isSelectActive fn

Ramesh Mane9a9bb543ac2b
diff --git a/packages/nc-gui/utils/browserUtils.ts b/packages/nc-gui/utils/browserUtils.ts
index a89327c32e..cb32477767 100644
--- a/packages/nc-gui/utils/browserUtils.ts
+++ b/packages/nc-gui/utils/browserUtils.ts
@@ -11,7 +11,16 @@ export const isNestedExpandedFormOpenExist = () => document.querySelectorAll('.n
export const isExpandedCellInputExist = () => document.querySelector('.expanded-cell-input')
export const isExtensionPaneActive = () => document.querySelector('.nc-extension-pane')
export const isGeneralOverlayActive = () => document.querySelector('.nc-general-overlay')
-export const isSelectActive = () => document.querySelector('.ant-select-dropdown')
+export const isSelectActive = () => {
+ const els = document.querySelectorAll<HTMLElement>('.ant-select-dropdown')
+ return (
+ Array.from(els).filter((el) => {
+ const style = window.getComputedStyle(el)
+ return style.display !== 'none' && style.visibility !== 'hidden' && style.opacity !== '0'
+ }).length > 0
+ )
+}
+
export const isViewSearchActive = () => document.querySelector('.nc-view-search-data') === document.activeElement
export const isCreateViewActive = () => document.querySelector('.nc-view-create-modal')
export const isActiveElementInsideExtension = () =>