# Hiding AdapTable

Canonical page: https://www.adaptabletools.com/docs/ui-tutorial-hiding-adaptable

- This UI Guide shows how developers can hide the AdapTable UI from their users (so they just see AG Grid)
- It also shows how they can show the AdapTable UI but remove all explicit mentions, and links, of the Tool

## Topics on this Page

| Topic                                     | Summary                                        |
| ----------------------------------------- | ---------------------------------------------- |
| [Hiding UI](#hiding-adaptable-ui)         | `hideAdaptableUI` / `showAdaptableUI`          |
| [White-label](#hiding-adaptable-mentions) | Documentation links, version, tool panel label |

[UI Guides](https://www.adaptabletools.com/docs/ui-tutorial-overview/index.md).

Some of our users want to "hide" AdapTable from their users.

This request can have 2 different meanings:

- Not showing any of the AdapTable UI - so the tool still runs and works but none of the UI is visible
- Hiding all mentions of the tool (so that all our components appear to be custom built)

Both of these are possible, as this UI Guide illustrates.

## Hiding AdapTable UI

Some users have the requirement that they want fully to hide the AdapTable UI.

This includes all means of re-activating the AdapTable UI from inside AG Grid.

If you wish to give your users a way of redisplaying the AdapTable UI, you will need to provide that mechanism yourself

There are 2 common scenarios that we encounter:

- Have a mechanism to switch between showing AG Grid with AdapTable, and just displaying AG Grid
- AdapTable's UI is hidden in all circumstances (but AdapTable operates under the covers)

- This could be because our client's setup contains a single directive to create all their Grids
- Or it could be because AdapTable's formatting, filtering or Conditional Styles functionality is required

This requirement is possible using two companion functions on [`UserInterfaceApi`](https://www.adaptabletools.com/docs/reference/userinterfaceapi.md) in [Adaptable API](https://www.adaptabletools.com/docs/technical-reference-adaptable-api/index.md):

- `hideAdaptableUI`
- `showAdaptableUI`

These functions will hide / show all AdapTable UI components:

- [Dashboard](https://www.adaptabletools.com/docs/ui-dashboard/index.md)
- [Tool Panel](https://www.adaptabletools.com/docs/ui-tool-panel/index.md)
- [AdapTable Status Bar](https://www.adaptabletools.com/docs/ui-status-bar/index.md)
- [Settings Panel](https://www.adaptabletools.com/docs/ui-settings-panel/index.md)
- [Column Menu](https://www.adaptabletools.com/docs/ui-column-menu/index.md)
- [Context Menu](https://www.adaptabletools.com/docs/ui-context-menu/index.md)

The one exception to this is the AdapTable [Column Filtering components](https://www.adaptabletools.com/docs/handbook-column-filter/index.md), which will remain in operation throughout

**Example: Hiding AdapTable UI from Users**

How to hide / show the AdapTable UI

- This example provides 2 buttons - placed in a container above AdapTable - that hide / show the AdapTable UI
- The Hide button removes the Dashboard, Status Bar panels and AdapTable Tool Panels as well as AdapTable's Column and Context menus
- Note: we have also added a [Format Style](https://www.adaptabletools.com/docs/handbook-column-formatting-adaptable-style/index.md) to the 3 Github columns - this remains in place even when AdapTable is hidden, as does the `Github Total` [Calculated Column](https://www.adaptabletools.com/docs/handbook-calculated-column/index.md)

Demo project (Vanilla); the files without a marker are shown below:

```text
src/
  adaptableOptions.ts
  agGridModules.ts     [template]
  columnDefs.ts        [template]
  gridOptions.ts       [template]
  index.ts             [template]
  onAdaptableReady.ts
  rowData.ts           [template]
  styles.css           [template]
index.html             [template]
package.json           [template]
tsconfig.json          [template]
```

Files marked `[template]` are the same in every demo; see the [demo template](https://www.adaptabletools.com/llms/demo-template.md#vanilla).

**`src/adaptableOptions.ts`**

```ts
import {AdaptableOptions} from '@adaptabletools/adaptable';
import {WebFramework} from './rowData';

export const adaptableOptions: AdaptableOptions<WebFramework> = {
  primaryKey: 'id',
  adaptableId: 'Hiding Adaptable',
  initialState: {
    Theme: {CurrentTheme: 'dark'},
    Dashboard: {
      Tabs: [
        {
          Name: 'Search',
          Toolbars: ['GridFilter', 'Export', 'SystemStatus'],
        },
      ],
    },
    StatusBar: {
      StatusBars: [
        {
          Key: 'Center Panel',
          StatusBarPanels: ['GridFilter', 'CellSummary', 'Layout', 'Theme'],
        },
      ],
    },
    FormatColumn: {
      FormatColumns: [
        {
          Name: 'formatColumn-github',
          Scope: {
            ColumnIds: ['github_stars', 'github_watchers', 'github_total'],
          },
          Style: {
            ForeColor: 'var(--ab-color-palette-19)',
          },
        },
      ],
    },
    CalculatedColumn: {
      CalculatedColumns: [
        {
          ColumnId: 'github_total',
          FriendlyName: 'Github Total',
          Expression: '[github_stars] + [github_watchers]',
          CalculatedColumnSettings: {
            DataType: 'number',
          },
        },
      ],
    },
    Layout: {
      CurrentLayout: 'Standard Layout',
      Layouts: [
        {
          TableColumns: [
            'name',
            'language',
            'github_stars',
            'github_watchers',
            'github_total',
            'license',
            'has_projects',
            'has_pages',
            'created_at',
            'has_wiki',
            'updated_at',
            'pushed_at',
            'week_issue_change',
          ],
          Name: 'Standard Layout',
          AutoSizeColumns: true,
        },
      ],
    },
  },
};
```

**`src/onAdaptableReady.ts`**

```ts
import {AdaptableReadyInfo} from '@adaptabletools/adaptable';

export const onAdaptableReady = ({adaptableApi}: AdaptableReadyInfo) => {
  const aboveGridContainer = document.getElementById(
    'demoOutputAbove'
  ) as HTMLDivElement;

  adaptableApi.systemStatusApi.setInfoSystemStatus('AdapTable is visible');
  var hideAdaptableElement = document.createElement('input');
  hideAdaptableElement.setAttribute('type', 'button');
  hideAdaptableElement.setAttribute('value', 'Hide AdapTable UI');
  hideAdaptableElement.setAttribute('name', 'Hide AdapTable UI');
  hideAdaptableElement.setAttribute('style', 'color:Green; margin-bottom: 10px; margin-left: 10px; margin-right: 10px;');
  hideAdaptableElement.onclick = function () {
    adaptableApi.userInterfaceApi.hideAdaptableUI();
  };
  aboveGridContainer.appendChild(hideAdaptableElement);

  var showAdaptableElement = document.createElement('input');
  showAdaptableElement.setAttribute('type', 'button');
  showAdaptableElement.setAttribute('value', 'Show AdapTable UI');
  showAdaptableElement.setAttribute('name', 'Show AdapTable UI');
  showAdaptableElement.setAttribute('style', 'color:Red; margin-bottom: 10px;');
  showAdaptableElement.onclick = function () {
    adaptableApi.userInterfaceApi.showAdaptableUI();
  };
  aboveGridContainer.appendChild(showAdaptableElement);
 
};
```

## Hiding AdapTable Mentions

It is possible to configure AdapTable so that while the UI is fully visible, nothing betrays its a 3rd party tool.

This is easily achievable - each of the following prominent AdapTable elements can be hidden:

- Documentation Links
- AdapTable Version
- AdapTable ToolPanel

### Hiding Documentation Links

AdapTable provides links to this documentation inside the tool in 2 places:

- in each Screen of the [Settings Panel](https://www.adaptabletools.com/docs/ui-settings-panel/index.md)
- in the [Expression Editor](https://www.adaptabletools.com/docs/ui-expression-editor/index.md)

This can be turned off using the `showDocumentationLinks` property in [User Interface Options](https://www.adaptabletools.com/docs/technical-reference-ui/index.md).

### `showDocumentationLinks`

Provide links to AdapTable documentation

Set this property to _false_ if you do not wish your users to see these links:

```ts {4}
// Stop users from seeing documentation links
const adaptableOptions: AdaptableOptions = {
  userInterfaceOptions: {
    showDocumentationLinks: false,
  },
};
```

### Hiding AdapTable Version

By default AdapTable provides information about which version number is being used in the Application.

This is displayed as the first item in the Summary section of the [Grid Info Screen](https://www.adaptabletools.com/docs/ui-settings-panel-grid-info/index.md).

This can be hidden using the `showAdapTableVersion` property in [User Interface Options](https://www.adaptabletools.com/docs/technical-reference-ui/index.md).

### `showAdapTableVersion`

Displays AdapTable Version in GridInfo section of Settings Panel

Set this property to _false_ if you do not wish your users to see the AdapTable Version:

```ts {4}
// Hide the AdapTable version in Grid Info
const adaptableOptions: AdaptableOptions = {
  userInterfaceOptions: {
    showAdapTableVersion: false,
  },
};
```

### `showAgGridVersion`

Displays the AG Grid version in Grid Info

Companion to `showAdapTableVersion`. Set this to `false` to hide the AG Grid version on the same Summary tab.

```ts {4}
const adaptableOptions: AdaptableOptions = {
  userInterfaceOptions: {
    showAgGridVersion: false,
  },
};
```

### Renaming AdapTable ToolPanel

By default, the [Tool Panel](https://www.adaptabletools.com/docs/ui-tool-panel/index.md) provided by AdapTable is named "AdapTable".

It is possible to [configure the Tool Panel](https://www.adaptabletools.com/docs/ui-tool-panel-configuring/index.md) in order to change this in 2 ways:

- **Hide** the AdapTable ToolPanel altogether, by not listing it in the Tool Panels section
- **Rename** the AdapTable Toolbar, so that it is still present but with a different name displayed

### Hiding State Management Module

Most Modules give no indication they are from AdapTable, they just work (e.g. Quick Search, Layout etc).

However the [State Management Module](https://www.adaptabletools.com/docs/dev-guide-adaptable-state-management/index.md) is very closely tied to AdapTable State, as it allows run-time users to save or reload their State.

Like all AdapTable Modules, setting the `AccessLevel` for the Module (in [Entitlements](https://www.adaptabletools.com/docs/handbook-permissioning/index.md)) to "hidden" will ensure that the panel is never visible to run-time users.

**Example: Hiding AdapTable Mentions from Users**

How to ensure users are unaware AdapTable is being used

- This demo shows how to "hide" Adaptable from the users of the Application:
  - `showDocumentationLinks` in [User Interface Options](https://www.adaptabletools.com/docs/technical-reference-ui/index.md) set to _false_ - this means that no links to AdapTable are displayed in the Settings Panel
  - `showAdapTableVersion` in [User Interface Options](https://www.adaptabletools.com/docs/technical-reference-ui/index.md) is also set to _false_ - this hides the version number that otherwise appears as first item in Summary section of [Settings Panel](https://www.adaptabletools.com/docs/ui-settings-panel/index.md)
  - The AdapTable Tool Panel component in `GridOptions` has been renamed 'My Grid' - in place of the default value of `AdapTable`
  - The [State Management](https://www.adaptabletools.com/docs/dev-guide-adaptable-state/index.md) module is set to `Hidden` in [Entitlements](https://www.adaptabletools.com/docs/handbook-permissioning/index.md)
### Expand to see the Adaptable Options and GridOptions properties set

These properties have been added to Adaptable Options:
```ts
userInterfaceOptions: {
  showDocumentationLinks: false,
  showAdapTableVersion: false,
},
entitlementOptions: {
  moduleEntitlements: [
    {adaptableModule: 'StateManagement', accessLevel: 'Hidden'},
  ],
},
```
And the Sidebar in GridOptions has been defined as follows:
```ts
sideBar: {
  toolPanels: [
    'columns',
    'filters',
    {
      id: 'adaptable',
      toolPanel: 'AdaptableToolPanel',
      labelDefault: 'My Grid',
    },
  ],
},
```

Demo project (Vanilla); the files without a marker are shown below:

```text
src/
  adaptableOptions.ts
  agGridModules.ts     [template]
  columnDefs.ts        [template]
  gridOptions.ts
  index.ts             [template]
  onAdaptableReady.ts  [template]
  rowData.ts           [template]
  styles.css           [template]
index.html             [template]
package.json           [template]
tsconfig.json          [template]
```

Files marked `[template]` are the same in every demo; see the [demo template](https://www.adaptabletools.com/llms/demo-template.md#vanilla).

**`src/adaptableOptions.ts`**

```ts
import {AdaptableOptions} from '@adaptabletools/adaptable';
import {WebFramework} from './rowData';

export const adaptableOptions: AdaptableOptions<WebFramework> = {
  primaryKey: 'id',
  adaptableId: 'Hiding Adaptable',
  userInterfaceOptions: {
    showDocumentationLinks: false,
    showAdapTableVersion: false,
  },
  entitlementOptions: {
    moduleEntitlements: [
      {adaptableModule: 'StateManagement', accessLevel: 'Hidden'},
    ],
  },
  initialState: {
    Theme: {CurrentTheme: 'dark'},
    Layout: {
      CurrentLayout: 'Standard Layout',
      Layouts: [
        {
          TableColumns: [
            'name',
            'language',
            'github_stars',
            'license',
            'has_projects',
            'has_pages',
            'created_at',
            'has_wiki',
            'updated_at',
            'pushed_at',
            'github_watchers',
            'week_issue_change',
          ],
          Name: 'Standard Layout',
          AutoSizeColumns: true,
        },
      ],
    },
  },
};
```

**`src/gridOptions.ts`**

```ts
import {GridOptions, themeBalham} from 'ag-grid-enterprise';
import {rowData} from './rowData';
import {columnDefs} from './columnDefs';

export const gridOptions: GridOptions = {
  theme: themeBalham,
  defaultColDef: {
    resizable: true,
    sortable: true,
    editable: true,
    filter: true,
    floatingFilter: true,
  },
  columnDefs: columnDefs,
  rowData: rowData,
  sideBar: {
    toolPanels: [
      'columns',
      'filters',
      {
        id: 'adaptable',
        toolPanel: 'AdaptableToolPanel',
        labelDefault: 'My Grid',
        labelKey: 'adaptable',
        iconKey: 'menu',
      },
    ],
  },
  suppressMenuHide: true,
  cellSelection: true,
};
```

### FAQ

**Does hiding UI stop column filters?**
No — AdapTable [Column Filter](https://www.adaptabletools.com/docs/handbook-column-filter/index.md) UI can remain active; see the note in [Hiding UI](#hiding-adaptable-ui).

**Can users bring the UI back?**
Only if you call `showAdaptableUI` from your own chrome — hidden mode does not leave an AdapTable restore control.
