Skip to content

Commit f92633d

Browse files
CSimoesJrrafaellmarques
authored andcommitted
fix(table): corrige valores padrão de propriedades
p-hide-batch-actions como default `true`. p-hide-table-search como default `true`. fixes DTHFUI-7575
1 parent cf074e6 commit f92633d

File tree

31 files changed

+44
-28
lines changed

31 files changed

+44
-28
lines changed

projects/portal/src/app/home/home.component.html

-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ <h4 class="section-title">UX Friendly</h4>
6161
<div class="home-widget-components-content">
6262
<po-table
6363
p-hide-columns-manager
64-
p-hide-table-search
6564
p-checkbox
6665
p-container
6766
p-no-shadow

projects/portal/src/app/tools/tools-dynamic-form/tools-dynamic-form.component.html

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
<po-widget>
4242
<po-table
4343
[p-height]="250"
44+
[p-hide-table-search]="false"
4445
[p-hide-text-overflow]="true"
4546
[p-sort]="true"
4647
[p-actions]="actions"

projects/portal/src/app/tools/tools-dynamic-view/tools-dynamic-view.component.html

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
<po-widget class="po-sm-12 po-lg-7" p-height="350">
4242
<po-table
4343
[p-height]="290"
44+
[p-hide-table-search]="false"
4445
[p-hide-text-overflow]="true"
4546
[p-sort]="true"
4647
[p-actions]="actions"

projects/templates/src/lib/components/po-page-dynamic-search/samples/sample-po-page-dynamic-search-hiring-processes/sample-po-page-dynamic-search-hiring-processes.component.html

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
(p-advanced-search)="onAdvancedSearch($event)"
1414
>
1515
<po-table
16+
[p-hide-batch-actions]="false"
1617
[p-selectable]="true"
1718
[p-single-select]="true"
1819
[p-sort]="true"

projects/templates/src/lib/components/po-page-dynamic-table/po-page-dynamic-table.component.html

-2
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,12 @@
1616
>
1717
<po-table
1818
[p-sort]="true"
19-
[p-hide-table-search]="true"
2019
[p-actions]="tableActions"
2120
[p-actions-right]="actionRight"
2221
[p-selectable]="enableSelectionTable"
2322
[p-columns]="columns"
2423
[p-items]="items"
2524
[p-height]="height"
26-
[p-hide-batch-actions]="true"
2725
[p-hide-columns-manager]="hideColumnsManager"
2826
[p-infinite-scroll]="infiniteScroll"
2927
[p-show-more-disabled]="!hasNext"

projects/templates/src/lib/components/po-page-dynamic-table/samples/sample-po-page-dynamic-table-users/sample-po-page-dynamic-table-users.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@
2121
</po-modal>
2222

2323
<po-modal #dependentsModal p-title="Dependents">
24-
<po-table [p-items]="dependents"> </po-table>
24+
<po-table [p-items]="dependents" [p-hide-table-search]="false"> </po-table>
2525
</po-modal>

projects/ui/src/lib/components/po-chart/samples/sample-po-chart-coffee-ranking/sample-po-chart-coffee-ranking.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,6 @@
8282
<po-container class="po-lg-12 po-mt-2">
8383
<div class="po-font-text-bold">Top 10 Largest Coffee Chains in the World</div>
8484

85-
<po-table p-container="shadow" [p-items]="items"> </po-table>
85+
<po-table p-container="shadow" [p-items]="items" [p-hide-table-search]="false"> </po-table>
8686
</po-container>
8787
</div>

projects/ui/src/lib/components/po-container/samples/sample-po-container-dashboard/sample-po-container-dashboard.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
</po-container>
3333

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

projects/ui/src/lib/components/po-disclaimer-group/samples/sample-po-disclaimer-group-sw-planets/sample-po-disclaimer-group-sw-planets.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@
3737
<hr />
3838

3939
<div class="po-row">
40-
<po-table class="po-md-12" [p-columns]="columns" [p-items]="filteredItems"> </po-table>
40+
<po-table class="po-md-12" [p-columns]="columns" [p-items]="filteredItems" [p-hide-table-search]="false"> </po-table>
4141
</div>

projects/ui/src/lib/components/po-field/po-lookup/po-lookup-modal/po-lookup-modal.component.html

-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
[p-single-select]="!multiple"
5555
[p-hide-action-fixed-columns]="true"
5656
[p-sort]="true"
57-
[p-hide-table-search]="true"
5857
[p-columns]="columns"
5958
[p-height]="tableHeight"
6059
[p-hide-columns-manager]="hideColumnsManager"
@@ -63,7 +62,6 @@
6362
[p-loading]="isLoading"
6463
[p-show-more-disabled]="!hasNext"
6564
[p-infinite-scroll]="infiniteScroll"
66-
[p-hide-batch-actions]="true"
6765
(p-selected)="onSelect($event)"
6866
(p-unselected)="onUnselect($event)"
6967
(p-all-selected)="onAllSelected($event)"

projects/ui/src/lib/components/po-field/po-lookup/samples/sample-po-lookup-multiple/sample-po-lookup-multiple.component.html

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
[p-items]="heroes"
1717
[p-height]="220"
1818
[p-striped]="true"
19-
[p-hide-batch-actions]="true"
2019
[p-hide-columns-manager]="true"
2120
[p-loading]="loading"
2221
></po-table>

projects/ui/src/lib/components/po-field/po-lookup/samples/sample-po-lookup-sw-films/sample-po-lookup-sw-films.component.html

+8-1
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,12 @@
3030
</div>
3131

3232
<div class="po-row" *ngIf="filmItemsFiltered && entity">
33-
<po-table class="po-sm-12" [p-columns]="filmColumns" [p-items]="filmItemsFiltered" [p-sort]="true"> </po-table>
33+
<po-table
34+
class="po-sm-12"
35+
[p-columns]="filmColumns"
36+
[p-items]="filmItemsFiltered"
37+
[p-sort]="true"
38+
[p-hide-table-search]="false"
39+
>
40+
</po-table>
3441
</div>

projects/ui/src/lib/components/po-field/po-multiselect/samples/sample-po-multiselect-heroes/sample-po-multiselect-heroes.component.html

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
[p-height]="220"
1818
[p-striped]="true"
1919
[p-hide-columns-manager]="true"
20+
[p-hide-table-search]="false"
2021
>
2122
</po-table>
2223
</po-container>

projects/ui/src/lib/components/po-field/po-switch/samples/sample-po-switch-order-reactive-form/sample-po-switch-order-reactive-form.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div class="po-row">
22
<po-widget class="po-md-6 po-lg-4" p-title="Order Summary">
33
<form [formGroup]="formOrderSummary">
4-
<po-table [p-columns]="columns" [p-items]="items"> </po-table>
4+
<po-table [p-columns]="columns" [p-items]="items" [p-hide-table-search]="false"> </po-table>
55

66
<po-switch
77
name="serviceFee"

projects/ui/src/lib/components/po-field/po-switch/samples/sample-po-switch-order/sample-po-switch-order.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div class="po-row">
22
<po-widget class="po-md-6 po-lg-4" p-title="Order Summary">
33
<form #f="ngForm">
4-
<po-table [p-columns]="columns" [p-items]="items"> </po-table>
4+
<po-table [p-columns]="columns" [p-items]="items" [p-hide-table-search]="false"> </po-table>
55

66
<po-switch
77
name="serviceFee"

projects/ui/src/lib/components/po-field/po-url/samples/sample-po-url-shortener/sample-po-url-shortener.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@
2323

2424
<hr />
2525

26-
<po-table p-striped="true" [p-columns]="urlColumns" [p-items]="baseUrls"> </po-table>
26+
<po-table p-striped="true" [p-columns]="urlColumns" [p-items]="baseUrls" [p-hide-table-search]="false"> </po-table>

projects/ui/src/lib/components/po-link/samples/sample-po-link-heroes/sample-po-link-heroes.component.html

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

projects/ui/src/lib/components/po-page/po-page-default/samples/sample-po-page-default-dashboard/sample-po-page-default-dashboard.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
<hr />
3535

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

3939
<po-modal p-title="Share webpage" [p-primary-action]="shareAction" [p-secondary-action]="cancelAction">

projects/ui/src/lib/components/po-page/po-page-list/samples/sample-po-page-list-hiring-processes/sample-po-page-list-hiring-processes.component.html

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
[p-striped]="true"
1414
[p-columns]="hiringProcessesColumns"
1515
[p-items]="hiringProcessesFiltered"
16-
[p-hide-table-search]="true"
1716
>
1817
</po-table>
1918
</po-page-list>

projects/ui/src/lib/components/po-table/po-table-base.component.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,9 @@ export abstract class PoTableBaseComponent implements OnChanges, OnDestroy {
155155
*
156156
* Permite que as ações em lote, responsável por excluir e exibir a quantidade de itens, sejam escondidas.
157157
*
158-
* @default `false`
158+
* @default `true`
159159
*/
160-
@Input({ alias: 'p-hide-batch-actions', transform: convertToBoolean }) hideBatchActions: boolean = false;
160+
@Input({ alias: 'p-hide-batch-actions', transform: convertToBoolean }) hideBatchActions: boolean = true;
161161

162162
/**
163163
* @optional
@@ -186,9 +186,9 @@ export abstract class PoTableBaseComponent implements OnChanges, OnDestroy {
186186
*
187187
* Permite que o campo de pesquisa seja escondido.
188188
*
189-
* @default `false`
189+
* @default `true`
190190
*/
191-
@Input({ alias: 'p-hide-table-search', transform: convertToBoolean }) hideTableSearch: boolean = false;
191+
@Input({ alias: 'p-hide-table-search', transform: convertToBoolean }) hideTableSearch: boolean = true;
192192

193193
/**
194194
* @optional

projects/ui/src/lib/components/po-table/samples/sample-po-table-airfare/sample-po-table-airfare.component.html

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
<po-table
66
[p-container]="true"
77
[p-height]="400"
8+
[p-hide-batch-actions]="false"
9+
[p-hide-table-search]="false"
810
[p-hide-text-overflow]="true"
911
[p-selectable]="true"
1012
[p-sort]="true"
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<po-table [p-items]="[{ table: 'PO Table', angular: 'PO-UI' }]" [p-hide-table-search]="true"> </po-table>
1+
<po-table [p-items]="[{ table: 'PO Table', angular: 'PO-UI' }]"> </po-table>

projects/ui/src/lib/components/po-table/samples/sample-po-table-components/sample-po-table-components.component.html

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
[p-loading-show-more]="isLoading"
88
[p-columns]="columns"
99
[p-items]="items"
10-
[p-hide-table-search]="true"
1110
[p-show-more-disabled]="showMoreDisabled"
1211
[p-sort]="true"
1312
(p-show-more)="showMore($event)"

projects/ui/src/lib/components/po-table/samples/sample-po-table-draggable/sample-po-table-draggable.component.html

+1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@
66
[p-items]="[{ code: '001', table: 'PO Table', angular: 'PO-UI' }]"
77
[p-draggable]="true"
88
[p-hide-columns-manager]="true"
9+
[p-hide-table-search]="false"
910
>
1011
</po-table>

projects/ui/src/lib/components/po-table/samples/sample-po-table-heroes/sample-po-table-heroes.component.html

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
[p-infinite-scroll]="true"
88
p-selectable="true"
99
[p-hide-select-all]="true"
10+
[p-hide-table-search]="false"
1011
p-infinite-scroll-distance="80"
1112
(p-selected)="changeOptions($event, 'new')"
1213
(p-unselected)="changeOptions($event, 'change')"
@@ -22,6 +23,7 @@
2223
<po-table
2324
#POItemsSelected
2425
[p-columns]="columns"
26+
[p-hide-table-search]="false"
2527
[p-striped]="true"
2628
[p-infinite-scroll]="true"
2729
p-height="300"

projects/ui/src/lib/components/po-table/samples/sample-po-table-labs/sample-po-table-labs.component.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export class SamplePoTableLabsComponent implements OnInit {
4242
itemIndex = 0;
4343
literals: string;
4444
maxColumns: number;
45-
properties: Array<string>;
45+
properties: Array<string> = ['hideBatchActions', 'hideTableSearch'];
4646
selection: Array<string>;
4747
spacing: PoTableColumnSpacing = PoTableColumnSpacing.Medium;
4848
filterType: PoFilterMode = PoFilterMode.startsWith;
@@ -197,7 +197,7 @@ export class SamplePoTableLabsComponent implements OnInit {
197197
this.itemIndex = 0;
198198
this.literals = '';
199199
this.maxColumns = undefined;
200-
this.properties = [];
200+
this.properties = ['hideBatchActions', 'hideTableSearch'];
201201
this.selection = [];
202202
this.spacing = PoTableColumnSpacing.Medium;
203203
this.filteredColumns = [];

projects/ui/src/lib/components/po-table/samples/sample-po-table-transport/sample-po-table-transport.component.html

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
[p-auto-collapse]="true"
33
[p-columns]="columns"
44
[p-hide-columns-manager]="true"
5+
[p-hide-table-search]="false"
56
[p-items]="items"
67
[p-sort]="true"
78
[p-striped]="true"

projects/ui/src/lib/components/po-table/samples/sample-po-table-with-api/sample-po-table-with-api.component.html

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
[p-columns]="columns"
5050
[p-service-api]="sampleService"
5151
[p-height]="300"
52+
[p-hide-table-search]="false"
5253
[p-infinite-scroll]="true"
5354
>
5455
</po-table>

projects/ui/src/lib/components/po-tree-view/samples/sample-po-tree-view-supermarket/sample-po-tree-view-supermarket.component.html

+7-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,13 @@
2121
[p-disabled]="itemsListSelected.length < 1"
2222
(p-primary-action)="checkOut()"
2323
>
24-
<po-table p-striped [p-columns]="columnsItemsSelected" [p-items]="itemsListSelected"> </po-table>
24+
<po-table
25+
p-striped
26+
[p-columns]="columnsItemsSelected"
27+
[p-items]="itemsListSelected"
28+
[p-hide-table-search]="false"
29+
>
30+
</po-table>
2531
</po-widget>
2632
</po-step>
2733

projects/ui/src/lib/components/po-widget/samples/sample-po-widget-finance-dashboard/sample-po-widget-finance-dashboard.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,5 @@
5353
</div>
5454

5555
<po-modal #detailsModal [p-title]="titleDetailsModal">
56-
<po-table [p-columns]="columnsDetails" [p-items]="itemsDetails"> </po-table>
56+
<po-table [p-columns]="columnsDetails" [p-items]="itemsDetails" [p-hide-table-search]="false"> </po-table>
5757
</po-modal>

projects/ui/src/lib/services/po-notification/samples/sample-po-notification-sales/sample-po-notification-sales.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050

5151
<hr />
5252

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

5555
<div class="po-row">
5656
<div class="po-pull-right po-lg-12">

0 commit comments

Comments
 (0)