Skip to main content
Version: 4.37.1

fix-mandatory-attribute-multi-list

🐛 Bug Fixes​

Mandatory flag when multiple lists are selected​

Goal: When a user selects several deposit lists that share the same attribute, the field must be mandatory if at least one selected list requires it.

Solution: Merge folder attributes by id with a logical OR on mandatory instead of letting the last selected list overwrite the flag.

Features:

  • Shared attributes (e.g. Product Type on High Jewellery + Jewellery) show the required asterisk when any selected list marks them mandatory
  • Validation (validationErrors, areValuesValid) follows the merged mandatory set

Files Modified:

  • src/components/DocumentsPanel/utils/attributeStore.ts - OR merge for duplicate attribute ids in setAttributes