|
191 | 191 | </div> |
192 | 192 | </div> |
193 | 193 |
|
194 | | - <div *ngIf="column.resizeable && !last && !useCardView" |
195 | | - (mousedown)="resizeManager.startResize($event, column, columnIndex)" |
196 | | - class="ui-grid-resize-anchor"> |
197 | | - <mat-icon> |
198 | | - <svg xmlns="http://www.w3.org/2000/svg" |
199 | | - width="24" |
200 | | - height="24"> |
201 | | - <path |
202 | | - d="M11 18l-2 2-2-2 2-2 2 2zm-2-8l-2 2 2 2 2-2-2-2zm0-6L7 6l2 2 2-2-2-2zm6 4l2-2-2-2-2 2 2 2zm0 2l-2 2 2 2 2-2-2-2zm0 6l-2 2 2 2 2-2-2-2z" /> |
203 | | - </svg> |
204 | | - </mat-icon> |
205 | | - </div> |
| 194 | + <ng-container *ngIf="column.resizeable && !last && !useCardView"> |
| 195 | + <div (click)="sortManager.changeSort(column)" |
| 196 | + class="ui-grid-resize-anchor"> |
| 197 | + </div> |
| 198 | + <div (mousedown)="resizeManager.startResize($event, column, columnIndex)" |
| 199 | + class="ui-grid-resize-anchor-border"> |
| 200 | + </div> |
| 201 | + </ng-container> |
206 | 202 | </div> |
207 | 203 |
|
208 | 204 | <div *ngIf="virtualScroll" |
|
336 | 332 | role="gridcell"> |
337 | 333 | <ng-container *ngLet="disableSelectionByEntry(row) as disabledReason"> |
338 | 334 | <div *ngIf="selectable && !singleSelectable" |
339 | | - class="ui-grid-mobile-feature-container ui-grid-mobile-refresh-container"> |
| 335 | + class="ui-grid-mobile-feature-container ui-grid-mobile-refresh-container"> |
340 | 336 | <mat-checkbox (click)="checkShift($event)" |
341 | | - (keyup.shift.space)="checkShift($event)" |
342 | | - (keyup.space)="checkShift($event)" |
343 | | - (change)="handleSelection(index, row)" |
344 | | - [checked]="selectionManager.isSelected(row)" |
345 | | - [indeterminate]="selectionManager.isIndeterminate(row)" |
346 | | - [matTooltip]="disabledReason || checkboxTooltip(row)" |
347 | | - [aria-label]="disabledReason || checkboxTooltip(row)" |
348 | | - [disabled]="!!disabledReason" |
349 | | - tabindex="0"> |
| 337 | + (keyup.shift.space)="checkShift($event)" |
| 338 | + (keyup.space)="checkShift($event)" |
| 339 | + (change)="handleSelection(index, row)" |
| 340 | + [checked]="selectionManager.isSelected(row)" |
| 341 | + [indeterminate]="selectionManager.isIndeterminate(row)" |
| 342 | + [matTooltip]="disabledReason || checkboxTooltip(row)" |
| 343 | + [aria-label]="disabledReason || checkboxTooltip(row)" |
| 344 | + [disabled]="!!disabledReason" |
| 345 | + tabindex="0"> |
350 | 346 | </mat-checkbox> |
351 | 347 | </div> |
352 | 348 | <div *ngIf="singleSelectable" |
353 | | - class="ui-grid-mobile-feature-container ui-grid-mobile-refresh-container"> |
| 349 | + class="ui-grid-mobile-feature-container ui-grid-mobile-refresh-container"> |
354 | 350 | <mat-radio-group> |
355 | 351 | <mat-radio-button [value]="row.id" |
356 | | - [checked]="selectionManager.isSelected(row)" |
357 | | - [disabled]="disabledReason" |
358 | | - [matTooltip]="disabledReason || checkboxTooltip(row)" |
359 | | - [aria-label]="disabledReason || checkboxTooltip(row)" |
360 | | - (change)="rowSelected(row)"></mat-radio-button> |
| 352 | + [checked]="selectionManager.isSelected(row)" |
| 353 | + [disabled]="disabledReason" |
| 354 | + [matTooltip]="disabledReason || checkboxTooltip(row)" |
| 355 | + [aria-label]="disabledReason || checkboxTooltip(row)" |
| 356 | + (change)="rowSelected(row)"></mat-radio-button> |
361 | 357 | </mat-radio-group> |
362 | 358 | </div> |
363 | 359 | </ng-container> |
|
378 | 374 | <ng-container *ngLet="disableSelectionByEntry(row) as disabledReason"> |
379 | 375 | <mat-radio-group *ngIf="singleSelectable; else multiSelectable"> |
380 | 376 | <mat-radio-button [value]="row.id" |
381 | | - [checked]="selectionManager.isSelected(row)" |
382 | | - [disabled]="disabledReason" |
383 | | - [matTooltip]="disabledReason || checkboxTooltip(row)" |
384 | | - [aria-label]="disabledReason || checkboxTooltip(row)" |
385 | | - (change)="rowSelected(row)"></mat-radio-button> |
| 377 | + [checked]="selectionManager.isSelected(row)" |
| 378 | + [disabled]="disabledReason" |
| 379 | + [matTooltip]="disabledReason || checkboxTooltip(row)" |
| 380 | + [aria-label]="disabledReason || checkboxTooltip(row)" |
| 381 | + (change)="rowSelected(row)"></mat-radio-button> |
386 | 382 | </mat-radio-group> |
387 | 383 | <ng-template #multiSelectable> |
388 | 384 | <mat-checkbox (click)="checkShift($event)" |
389 | | - (keyup.shift.space)="checkShift($event)" |
390 | | - (keyup.space)="checkShift($event)" |
391 | | - (change)="handleSelection(index, row)" |
392 | | - [checked]="selectionManager.isSelected(row)" |
393 | | - [indeterminate]="selectionManager.isIndeterminate(row)" |
394 | | - [matTooltip]="disabledReason || checkboxTooltip(row)" |
395 | | - [aria-label]="disabledReason || checkboxTooltip(row)" |
396 | | - [disabled]="disabledReason" |
397 | | - tabindex="0"> |
| 385 | + (keyup.shift.space)="checkShift($event)" |
| 386 | + (keyup.space)="checkShift($event)" |
| 387 | + (change)="handleSelection(index, row)" |
| 388 | + [checked]="selectionManager.isSelected(row)" |
| 389 | + [indeterminate]="selectionManager.isIndeterminate(row)" |
| 390 | + [matTooltip]="disabledReason || checkboxTooltip(row)" |
| 391 | + [aria-label]="disabledReason || checkboxTooltip(row)" |
| 392 | + [disabled]="disabledReason" |
| 393 | + tabindex="0"> |
398 | 394 | </mat-checkbox> |
399 | 395 | </ng-template> |
400 | 396 | </ng-container> |
401 | 397 | </div> |
402 | 398 |
|
403 | | - <ng-container *ngFor="let column of renderedColumns$ | async"> |
| 399 | + <ng-container *ngFor="let column of renderedColumns$ | async; let lastColumn = last"> |
404 | 400 | <div [class.ui-grid-primary]="column.directive.primary" |
405 | 401 | [class.ui-grid-secondary]="!column.directive.primary" |
406 | 402 | [class.ui-grid-state-resizing]="column.directive === resizeManager.current?.column" |
|
410 | 406 | [attr.role]="column.role" |
411 | 407 | class="ui-grid-cell"> |
412 | 408 | <div *ngIf="isProjected" |
413 | | - [matTooltip]="column.directive.title ?? ''" |
414 | | - [matTooltipDisabled]="resizeManager.isResizing" |
415 | | - class="ui-grid-cell-mobile-title">{{column.directive.title}}</div> |
416 | | - <div class="ui-grid-cell-content"> |
417 | | - <ng-container *ngTemplateOutlet="column.directive.html || textCellTemplate; context: { |
418 | | - data: row, |
419 | | - index: index, |
420 | | - property: column.directive.property |
421 | | - }"> |
422 | | - </ng-container> |
423 | | - </div> |
| 409 | + [matTooltip]="column.directive.title ?? ''" |
| 410 | + [matTooltipDisabled]="resizeManager.isResizing" |
| 411 | + class="ui-grid-cell-mobile-title">{{column.directive.title}}</div> |
| 412 | + |
| 413 | + <div *ngIf="!isProjected" class="ui-grid-cell-inner"> |
| 414 | + <ng-container *ngTemplateOutlet="uiGridCellContent; context: { column, row, index }"></ng-container> |
| 415 | + </div> |
| 416 | + |
| 417 | + <ng-container *ngIf="isProjected"> |
| 418 | + <ng-container *ngTemplateOutlet="uiGridCellContent; context: { column, row, index }"></ng-container> |
| 419 | + </ng-container> |
| 420 | + |
| 421 | + <div *ngIf="!isProjected && column.directive.resizeable && !lastColumn && !useCardView" class="ui-grid-resizing-border"></div> |
424 | 422 | </div> |
425 | 423 | </ng-container> |
426 | 424 |
|
|
460 | 458 | </div> |
461 | 459 | </ng-template> |
462 | 460 |
|
| 461 | +<ng-template #uiGridCellContent let-column="column" let-row="row" let-index="index"> |
| 462 | + <div class="ui-grid-cell-content"> |
| 463 | + <ng-container *ngTemplateOutlet="column.directive.html || textCellTemplate; context: { |
| 464 | + data: row, |
| 465 | + index: index, |
| 466 | + property: column.directive.property |
| 467 | + }"> |
| 468 | + </ng-container> |
| 469 | + </div> |
| 470 | +</ng-template> |
| 471 | + |
463 | 472 | <ng-template #textCellTemplate |
464 | 473 | let-row="data" |
465 | 474 | let-property="property"> |
|
0 commit comments