This repository has been archived by the owner on Oct 4, 2021. It is now read-only.
Simplify Option[Seq[_]] -> Seq[_] once validation for arrays is done for govuk-frontend #32
Labels
enhancement
New feature or request
Once this issue is resolved alphagov/govuk-frontend#1618 (there is branch with a resolution here https://github.com/dorightdigital/govuk-frontend/commits/identify-empty-arrays), we can simplify components that take lists of things
Option[Seq[_]]
intoSeq[_]
. This type was introduced to map as a Scala type Javascript'sundefined
and empty arrays which are respectivelyfalsy
andtruthy
values.Ex:
The input to
govukDateInput
becomes:instead of
And the template:
can become
The same changes should be applied to all the affected components and this will be a breaking change.
The text was updated successfully, but these errors were encountered: