Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

Commit

Permalink
Hide actions column in datagrid if there is no contextual actions
Browse files Browse the repository at this point in the history
Signed-off-by: Presiana Dimitrova <[email protected]>
  • Loading branch information
dpresiana committed Jun 13, 2023
1 parent f96c981 commit 7c7863f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion projects/components/CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

- Hide actions column in datagrid if there is no contextual actions
## [15.0.1-dev.3]

### Removed
Expand Down
4 changes: 2 additions & 2 deletions projects/components/src/datagrid/datagrid.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ <h3 *ngIf="this.header" class="vcd-header">{{ header }}</h3>
</clr-dg-action-bar>

<clr-dg-column
*ngIf="shouldDisplayContextualActionsInRow"
*ngIf="shouldDisplayContextualActionsInRow && contextualActions?.length"
[ngClass]="shouldDisplayContextualActionsInDropdpown ? 'dropdown-actions' : 'buttons-' + maxFeaturedActionsOnRow"
>
<ng-container *ngIf="!shouldDisplayContextualActionsInDropdpown">
Expand Down Expand Up @@ -55,7 +55,7 @@ <h3 *ngIf="this.header" class="vcd-header">{{ header }}</h3>
[clrDgSelectable]="isRowSelectable(restItem)"
>
<clr-dg-cell
*ngIf="shouldDisplayContextualActionsInRow"
*ngIf="shouldDisplayContextualActionsInRow && contextualActions?.length"
class="action-button-cell"
[ngClass]="shouldDisplayContextualActionsInDropdpown ? 'dropdown-actions' : 'buttons-' + maxFeaturedActionsOnRow"
>
Expand Down

0 comments on commit 7c7863f

Please sign in to comment.