<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@datashaper/react](./react.md) &gt; [visibleColumnsCommand](./react.visiblecolumnscommand.md)

## visibleColumnsCommand() function

Constructs a visible columns command. This is a dropdown button that lists all of the columns in a table, with checks next to the visible ones.

<b>Signature:</b>

```typescript
export declare function visibleColumnsCommand(table: ColumnTable, columns?: string[], onCheckChange?: (column: string, checked: boolean) => void, props?: Partial<ICommandBarItemProps>): ICommandBarItemProps;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  table | ColumnTable |  |
|  columns | string\[\] | <i>(Optional)</i> |
|  onCheckChange | (column: string, checked: boolean) =&gt; void | <i>(Optional)</i> |
|  props | Partial&lt;ICommandBarItemProps&gt; | <i>(Optional)</i> |

<b>Returns:</b>

ICommandBarItemProps


