# AG Grid - Toolbar Specs ## Order of `Tools` and elements are predefined and locked: ### Left-side Tools: 1. `QuickSearch Input` 2. `Filter` button 3. `Sorting Selector` 4. `Column Selector` 5. `Grouping Selector` 6. Any user defined elements after that ### Right-side Tools: 1. `Row count` 2. ~~`Editing toggle`~~ 3. `Grid / List View Toggle` ## Display behavior of `Tools`. The following Tools are displayed when... ### Left-Side Tools: - `QuickSearch Input`: `quickSearch: true` is defined in `filterDefs` - `Filter` button: `filterDefs` - `Sorting Selector: At least 1 column is sortable OR user-defined `hideSortSelector` is `false` - `Column Selector`: user-defined `hideColSelector` is `false` - `Grouping Selector`: TBD - Appended user-defined elements: if they exist ## Right-Side Tools - `Row count`: `itemCount` is defined - `Grid / List View Toggle`: if `viewsToggleProps` are defined (TBD) ## Selection-based CTAs This state replaces the `Tools` UI (both right + left Tools) ### Display behavior The Selection-based CTAs only display when... - Grid is selectable (TODO: determine API) - OR Only shows when at least 1 `columnDefs` object has `checkboxSelection: true` - `getActionsFromSelection` must be defined. ### Order: 1. Selection count 2. Primary CTAs 3. Secondary CTAS ### CTAs - - Primary CTAs: - Required - A list of `ButtonProps` or `ButtonMenuProps` - Secondary CTAs: - Optional - `ButtonMenuProps`