- {(parameter.choices ?? []).map((choice) => (
-
{
- const next = data.checked
- ? [...selected, choice]
- : selected.filter((entry) => entry !== choice)
- onChange(parameter.name, next)
- }}
- data-testid={`param-${parameter.name}-${choice}`}
- />
- ))}
+
+ {label}
+ {(parameter.choices ?? []).map((choice) => {
+ const choiceLabelId = `param-${encodeURIComponent(parameter.name)}-${encodeURIComponent(choice)}-label`
+ return (
+ {
+ const next = data.checked
+ ? [...selected, choice]
+ : selected.filter((entry) => entry !== choice)
+ onChange(parameter.name, next)
+ }}
+ data-testid={`param-${parameter.name}-${choice}`}
+ />
+ )
+ })}
)