Skip to content

Commit 702e834

Browse files
committed
Expander improvements
- Fix expander style to allow having a card expander inside a "normal" expander. - Fix `expanded` option to work on card expander (allowing to have the expander open by default also for card expander)
1 parent 8b4c009 commit 702e834

File tree

5 files changed

+18
-4
lines changed

5 files changed

+18
-4
lines changed

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# 2.64.8 (2024-02-20)
2+
3+
### Improvements
4+
5+
- **Expander**:
6+
- Fix expander style to allow having a card expander inside a "normal" expander.
7+
- Fix `expanded` option to work on card expander (allowing to have the expander open by default also for card expander)
8+
19
# 2.64.7 (2024-02-15)
210

311
### Improvements

projects/demo/src/app/demo/pages/expand-page/expander-page.component.html

+7-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,13 @@ <h3>Inputs</h3>
156156
<dd>
157157
Card option allows to change the expander look and feel by displaying toggle button on the right and any
158158
<code>pa-expander-header-side-block</code>
159-
on the left. When this option is set, the expander is collapsed by default.
159+
on the left. When this option is set, the expander is collapsed by default
160+
<small>
161+
This behavior can be overridden by using the
162+
<code>expanded</code>
163+
property.
164+
</small>
165+
.
160166
</dd>
161167

162168
<dt>disabled</dt>

projects/pastanaga-angular/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@guillotinaweb/pastanaga-angular",
33
"description": "Provides Pastanaga UI elements as Angular components",
4-
"version": "2.64.7",
4+
"version": "2.64.8",
55
"license": "MIT",
66
"keywords": [
77
"angular",

projects/pastanaga-angular/src/lib/expander/expander.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export class ExpanderComponent implements AfterViewInit, OnChanges, OnDestroy {
6464
this.collapse();
6565
}
6666
}
67-
if (changes['card']?.currentValue) {
67+
if (changes['card']?.currentValue && !changes['expanded']?.currentValue) {
6868
this.expanded = false;
6969
this.contentHidden = true;
7070
}

projects/pastanaga-angular/src/styles/components/_expander.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
}
6666
}
6767

68-
.pa-expander-header {
68+
& > .pa-expander-header {
6969
background: $background-color-expanded-expander-header;
7070
box-shadow: $box-shadow-expanded-expander-header;
7171
transition:

0 commit comments

Comments
 (0)