diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/collections/collectionSchema/CollectionSchemaView.tsx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx index 7a65b4436..4498a2258 100644 --- a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx +++ b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx @@ -27,6 +27,7 @@ import { DefaultStyleProvider } from '../../StyleProvider'; import { DocumentManager } from '../../../util/DocumentManager'; import { ScriptField } from '../../../../fields/ScriptField'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import { IconButton } from 'browndash-components'; export enum ColumnType { Number, @@ -889,10 +890,18 @@ export class CollectionSchemaView extends CollectionSubView() { <div className="schema-header-button" onPointerDown={e => { - this.openColumnMenu(-1, true); + this._columnMenuIndex && this._columnMenuIndex === -1 ? this.closeColumnMenu() : this.openColumnMenu(-1, true); }}> <FontAwesomeIcon icon="plus" /> </div> + {/* <IconButton + icon={<FontAwesomeIcon icon="plus" />} + onPointerDown={e => { + console.log('clicked'); + this._columnMenuIndex && this._columnMenuIndex === -1 ? this.closeColumnMenu() : this.openColumnMenu(-1, true); + e.stopPropagation(); + }} + /> */} </div> {this.columnKeys.map((key, index) => { return ( |