Code field was reworked so it can adapt to container size and shrink when there is not enough space. Updated implementation no longer relies on UIKit to draw UI. UIViewRepresentable is used to receive keyboard actions and be able to become first responder.
For now implementation reuses existing POInputStyle for styling purposes, but there is new POCodeFieldStyle that is more customizible and will replace existing style in future.
Behaviour is slightly different to old implementation. New text can be only appended to existing, for example it is no longer possible to enter ◯ 1 ◯, only 1 ◯ ◯ (where ◯ is an empty box).
Description
Code field was reworked so it can adapt to container size and shrink when there is not enough space. Updated implementation no longer relies on UIKit to draw UI.
UIViewRepresentable
is used to receive keyboard actions and be able to become first responder.For now implementation reuses existing
POInputStyle
for styling purposes, but there is newPOCodeFieldStyle
that is more customizible and will replace existing style in future.Behaviour is slightly different to old implementation. New text can be only appended to existing, for example it is no longer possible to enter
◯ 1 ◯
, only1 ◯ ◯
(where◯
is an empty box).Jira Issue
https://checkout.atlassian.net/browse/POM-255