Skip to content

Commit

Permalink
pkp/pkp-lib#9996 add jsdocs
Browse files Browse the repository at this point in the history
  • Loading branch information
jardakotesovec committed Jun 10, 2024
1 parent b717553 commit 2be9225
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/components/Form/formHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@ export function shouldShowGroup(group, fields) {
return whenField.value === group.showWhen[1];
}

/**
* Should a field be shown?
*
* @param {Object} field One field to check
* @param {Object} fields All form fields
* @param {Object} groups All form groups
* @return {Boolean}
*/

export function shouldShowField(field, fields, groups) {
const group = groups.find((group) => group.id === field.groupId);

Expand Down

0 comments on commit 2be9225

Please sign in to comment.