Skip to content

Commit

Permalink
Ensure StreamField panels validation errors are visible
Browse files Browse the repository at this point in the history
...by rendering panels as expanded, regardless of the collapse
setting specified by the Wagtail implementor.

Fixes wagtail#8990 partially.
  • Loading branch information
Stormheg committed Jul 13, 2023
1 parent c8823d6 commit b00d82e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions client/src/components/StreamField/blocks/BaseSequenceBlock.js
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,11 @@ export class BaseSequenceChild extends EventEmitter {

setError(error) {
this.block.setError(error);

// If there is an error, the panel should be expanded always so the error is not obscured
if (error) {
toggleCollapsiblePanel(this.toggleElement, true);
}
}

focus(opts) {
Expand Down

0 comments on commit b00d82e

Please sign in to comment.