Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

* Add missing Pages manager shortcuts list helper.
* Improve the `isEmpty` method of the rich text widget to take into account the HTML blocks (`<figure>` and `<table>`) that are not empty but do not contain any plain text.
* (Backward compatibility break) Conditional field that depends on already hidden field is also hidden, again.

## 4.18.0 (2025-06-11)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export function getConditionalFields(
values,
field[conditionType],
(propName, condition, docValue) =>
evaluateExternal(propName, condition, conditionType)
evaluateExternalAndHidden(propName, condition, conditionType)
);
}
}
Expand All @@ -134,10 +134,14 @@ export function getConditionalFields(

// Handle external conditions as a voter function.
// Non-boolean returns are ignored by the `checkIfConditions` function.
function evaluateExternal(propName, conditionValue, conditionType) {
function evaluateExternalAndHidden(propName, conditionValue, conditionType) {
if (isExternalCondition(propName, conditionType)) {
return externalConditionsResults[conditionType]?.[propName] === conditionValue;
}

if (result[conditionType]?.[propName] === false) {
return false;
}
}
}

Expand Down
Loading