ministryofjustice / moj-frontend

Use the MoJ Design System to design, build, and deliver accessible and consistent services.
https://design-patterns.service.justice.gov.uk/
MIT License
33 stars 21 forks source link

Multi-select component doesn't allow multiples on same page #914

Open starswan opened 1 week ago

starswan commented 1 week ago

Prerequisites

Description

Put multiple multi-select components on the same page at once

Steps to Reproduce

Attempt to interact with second multi-select 'select all' button to either select or deselect all items in second component

Expected behaviour:

Second multi-select selects and deselects all items

Actual behaviour: It appears to interact with the first list instead

Reproduces how often:

100%

Versions

5.71

Additional Information

This appears to be caused by line 22 in multi-select.js - it uses a fixed id for the multiple select column