Skip to content

Commit

Permalink
fix(table): corrige valores padrão de propriedades
Browse files Browse the repository at this point in the history
p-hide-batch-actions como default `true`.
p-hide-table-search como default `true`.

fixes DTHFUI-7575
  • Loading branch information
CSimoesJr authored and rafaellmarques committed Oct 25, 2023
1 parent cf074e6 commit f92633d
Show file tree
Hide file tree
Showing 31 changed files with 44 additions and 28 deletions.
1 change: 0 additions & 1 deletion projects/portal/src/app/home/home.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ <h4 class="section-title">UX Friendly</h4>
<div class="home-widget-components-content">
<po-table
p-hide-columns-manager
p-hide-table-search
p-checkbox
p-container
p-no-shadow
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
<po-widget>
<po-table
[p-height]="250"
[p-hide-table-search]="false"
[p-hide-text-overflow]="true"
[p-sort]="true"
[p-actions]="actions"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
<po-widget class="po-sm-12 po-lg-7" p-height="350">
<po-table
[p-height]="290"
[p-hide-table-search]="false"
[p-hide-text-overflow]="true"
[p-sort]="true"
[p-actions]="actions"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
(p-advanced-search)="onAdvancedSearch($event)"
>
<po-table
[p-hide-batch-actions]="false"
[p-selectable]="true"
[p-single-select]="true"
[p-sort]="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,12 @@
>
<po-table
[p-sort]="true"
[p-hide-table-search]="true"
[p-actions]="tableActions"
[p-actions-right]="actionRight"
[p-selectable]="enableSelectionTable"
[p-columns]="columns"
[p-items]="items"
[p-height]="height"
[p-hide-batch-actions]="true"
[p-hide-columns-manager]="hideColumnsManager"
[p-infinite-scroll]="infiniteScroll"
[p-show-more-disabled]="!hasNext"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@
</po-modal>

<po-modal #dependentsModal p-title="Dependents">
<po-table [p-items]="dependents"> </po-table>
<po-table [p-items]="dependents" [p-hide-table-search]="false"> </po-table>
</po-modal>
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,6 @@
<po-container class="po-lg-12 po-mt-2">
<div class="po-font-text-bold">Top 10 Largest Coffee Chains in the World</div>

<po-table p-container="shadow" [p-items]="items"> </po-table>
<po-table p-container="shadow" [p-items]="items" [p-hide-table-search]="false"> </po-table>
</po-container>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</po-container>

<po-container class="po-lg-6">
<po-table [p-columns]="columns" [p-items]="items" p-striped="true"> </po-table>
<po-table [p-columns]="columns" [p-items]="items" p-striped="true" [p-hide-table-search]="false"> </po-table>
</po-container>
</po-page-default>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@
<hr />

<div class="po-row">
<po-table class="po-md-12" [p-columns]="columns" [p-items]="filteredItems"> </po-table>
<po-table class="po-md-12" [p-columns]="columns" [p-items]="filteredItems" [p-hide-table-search]="false"> </po-table>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
[p-single-select]="!multiple"
[p-hide-action-fixed-columns]="true"
[p-sort]="true"
[p-hide-table-search]="true"
[p-columns]="columns"
[p-height]="tableHeight"
[p-hide-columns-manager]="hideColumnsManager"
Expand All @@ -63,7 +62,6 @@
[p-loading]="isLoading"
[p-show-more-disabled]="!hasNext"
[p-infinite-scroll]="infiniteScroll"
[p-hide-batch-actions]="true"
(p-selected)="onSelect($event)"
(p-unselected)="onUnselect($event)"
(p-all-selected)="onAllSelected($event)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
[p-items]="heroes"
[p-height]="220"
[p-striped]="true"
[p-hide-batch-actions]="true"
[p-hide-columns-manager]="true"
[p-loading]="loading"
></po-table>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,12 @@
</div>

<div class="po-row" *ngIf="filmItemsFiltered && entity">
<po-table class="po-sm-12" [p-columns]="filmColumns" [p-items]="filmItemsFiltered" [p-sort]="true"> </po-table>
<po-table
class="po-sm-12"
[p-columns]="filmColumns"
[p-items]="filmItemsFiltered"
[p-sort]="true"
[p-hide-table-search]="false"
>
</po-table>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
[p-height]="220"
[p-striped]="true"
[p-hide-columns-manager]="true"
[p-hide-table-search]="false"
>
</po-table>
</po-container>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="po-row">
<po-widget class="po-md-6 po-lg-4" p-title="Order Summary">
<form [formGroup]="formOrderSummary">
<po-table [p-columns]="columns" [p-items]="items"> </po-table>
<po-table [p-columns]="columns" [p-items]="items" [p-hide-table-search]="false"> </po-table>

<po-switch
name="serviceFee"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="po-row">
<po-widget class="po-md-6 po-lg-4" p-title="Order Summary">
<form #f="ngForm">
<po-table [p-columns]="columns" [p-items]="items"> </po-table>
<po-table [p-columns]="columns" [p-items]="items" [p-hide-table-search]="false"> </po-table>

<po-switch
name="serviceFee"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@

<hr />

<po-table p-striped="true" [p-columns]="urlColumns" [p-items]="baseUrls"> </po-table>
<po-table p-striped="true" [p-columns]="urlColumns" [p-items]="baseUrls" [p-hide-table-search]="false"> </po-table>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<po-table p-service-api="https://po-sample-api.fly.dev/v1/heroes" [p-columns]="columns">
<po-table p-service-api="https://po-sample-api.fly.dev/v1/heroes" [p-columns]="columns" [p-hide-table-search]="false">
<ng-template p-table-column-template [p-property]="'nickname'" let-value>
<po-link [p-label]="value" (p-action)="selectedMyHero(value)" p-open-new-tab="true"></po-link>
</ng-template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

<hr />

<po-table [p-columns]="columns" [p-items]="items"> </po-table>
<po-table [p-columns]="columns" [p-items]="items" [p-hide-table-search]="false"> </po-table>
</po-page-default>

<po-modal p-title="Share webpage" [p-primary-action]="shareAction" [p-secondary-action]="cancelAction">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
[p-striped]="true"
[p-columns]="hiringProcessesColumns"
[p-items]="hiringProcessesFiltered"
[p-hide-table-search]="true"
>
</po-table>
</po-page-list>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ export abstract class PoTableBaseComponent implements OnChanges, OnDestroy {
*
* Permite que as ações em lote, responsável por excluir e exibir a quantidade de itens, sejam escondidas.
*
* @default `false`
* @default `true`
*/
@Input({ alias: 'p-hide-batch-actions', transform: convertToBoolean }) hideBatchActions: boolean = false;
@Input({ alias: 'p-hide-batch-actions', transform: convertToBoolean }) hideBatchActions: boolean = true;

/**
* @optional
Expand Down Expand Up @@ -186,9 +186,9 @@ export abstract class PoTableBaseComponent implements OnChanges, OnDestroy {
*
* Permite que o campo de pesquisa seja escondido.
*
* @default `false`
* @default `true`
*/
@Input({ alias: 'p-hide-table-search', transform: convertToBoolean }) hideTableSearch: boolean = false;
@Input({ alias: 'p-hide-table-search', transform: convertToBoolean }) hideTableSearch: boolean = true;

/**
* @optional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
<po-table
[p-container]="true"
[p-height]="400"
[p-hide-batch-actions]="false"
[p-hide-table-search]="false"
[p-hide-text-overflow]="true"
[p-selectable]="true"
[p-sort]="true"
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<po-table [p-items]="[{ table: 'PO Table', angular: 'PO-UI' }]" [p-hide-table-search]="true"> </po-table>
<po-table [p-items]="[{ table: 'PO Table', angular: 'PO-UI' }]"> </po-table>
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
[p-loading-show-more]="isLoading"
[p-columns]="columns"
[p-items]="items"
[p-hide-table-search]="true"
[p-show-more-disabled]="showMoreDisabled"
[p-sort]="true"
(p-show-more)="showMore($event)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
[p-items]="[{ code: '001', table: 'PO Table', angular: 'PO-UI' }]"
[p-draggable]="true"
[p-hide-columns-manager]="true"
[p-hide-table-search]="false"
>
</po-table>
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
[p-infinite-scroll]="true"
p-selectable="true"
[p-hide-select-all]="true"
[p-hide-table-search]="false"
p-infinite-scroll-distance="80"
(p-selected)="changeOptions($event, 'new')"
(p-unselected)="changeOptions($event, 'change')"
Expand All @@ -22,6 +23,7 @@
<po-table
#POItemsSelected
[p-columns]="columns"
[p-hide-table-search]="false"
[p-striped]="true"
[p-infinite-scroll]="true"
p-height="300"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export class SamplePoTableLabsComponent implements OnInit {
itemIndex = 0;
literals: string;
maxColumns: number;
properties: Array<string>;
properties: Array<string> = ['hideBatchActions', 'hideTableSearch'];
selection: Array<string>;
spacing: PoTableColumnSpacing = PoTableColumnSpacing.Medium;
filterType: PoFilterMode = PoFilterMode.startsWith;
Expand Down Expand Up @@ -197,7 +197,7 @@ export class SamplePoTableLabsComponent implements OnInit {
this.itemIndex = 0;
this.literals = '';
this.maxColumns = undefined;
this.properties = [];
this.properties = ['hideBatchActions', 'hideTableSearch'];
this.selection = [];
this.spacing = PoTableColumnSpacing.Medium;
this.filteredColumns = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
[p-auto-collapse]="true"
[p-columns]="columns"
[p-hide-columns-manager]="true"
[p-hide-table-search]="false"
[p-items]="items"
[p-sort]="true"
[p-striped]="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
[p-columns]="columns"
[p-service-api]="sampleService"
[p-height]="300"
[p-hide-table-search]="false"
[p-infinite-scroll]="true"
>
</po-table>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@
[p-disabled]="itemsListSelected.length < 1"
(p-primary-action)="checkOut()"
>
<po-table p-striped [p-columns]="columnsItemsSelected" [p-items]="itemsListSelected"> </po-table>
<po-table
p-striped
[p-columns]="columnsItemsSelected"
[p-items]="itemsListSelected"
[p-hide-table-search]="false"
>
</po-table>
</po-widget>
</po-step>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@
</div>

<po-modal #detailsModal [p-title]="titleDetailsModal">
<po-table [p-columns]="columnsDetails" [p-items]="itemsDetails"> </po-table>
<po-table [p-columns]="columnsDetails" [p-items]="itemsDetails" [p-hide-table-search]="false"> </po-table>
</po-modal>
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

<hr />

<po-table p-striped="true" [p-columns]="columns" [p-items]="products"> </po-table>
<po-table p-striped="true" [p-columns]="columns" [p-items]="products" [p-hide-table-search]="false"> </po-table>

<div class="po-row">
<div class="po-pull-right po-lg-12">
Expand Down

0 comments on commit f92633d

Please sign in to comment.