Skip to content

Commit

Permalink
Fix search box on card views dashlet
Browse files Browse the repository at this point in the history
Show/Hide search box on card views dashlet depending on
dashlet `canSearch` attribute.

Fixes RM-65214

Signed-off-by: Pierre Belloy <[email protected]>
  • Loading branch information
pbe-axelor committed Jun 12, 2023
1 parent a75d16a commit 6f0ae0b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion axelor-core/src/main/resources/object-views.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -1478,7 +1478,7 @@
<xsd:attribute name="canSearch" type="xsd:boolean">
<xsd:annotation>
<xsd:documentation>
Whether to enable search header on grid view dashlet.
Whether to enable search header (for grid views) or search box (for card views).
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
Expand Down
2 changes: 1 addition & 1 deletion axelor-web/src/main/webapp/js/view/view.kanban.js
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,7 @@ angular.module('axelor.ui').directive('uiPortletCards', function () {
link: function (scope, element, attrs) {
linker(scope, element, attrs);
scope.showPager = true;
scope.showSearch = true;
scope.showSearch = !scope.noFilter;
},
template:
"<div class='portlet-cards' ui-portlet-refresh>" +
Expand Down
3 changes: 3 additions & 0 deletions changelogs/unreleased/fix-card-dashlet-search-box.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
title: Fix search box show/hide on cards view dashlet depending on dashlet `canSearch` attribute
type: fix
2 changes: 1 addition & 1 deletion documentation/modules/dev-guide/pages/views/form.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ A `panel-dashlet` can have following attributes:
| *`action`* |
| `name` | name of the panel
| `title` | title of the panel
| `canSearch` | enable search header on grid view portlet
| `canSearch` | enable search header (for grid views) or search box (for card views)
| `height` | height taken by the widget
| `colSpan` | number of columns taken by the widget
| `hidden` | whether to hide the widget
Expand Down

0 comments on commit 6f0ae0b

Please sign in to comment.