@iway1 Our code finds a mapping based on array type ignoring cardinality but the prop types map only if the mapping includes the exact cardinality. This makes the Unwrap unwrap array cardinality as well so the types match the code behavior. I added a test that only compiles with this unwrap change and also tested to make sure the code actually renders this mapping regardless of cardinality as well.
Alternatively we could make the code match the types and render a different mapping for different cardinality arrays but i think this is likely preferred. Maybe a good follow on would be to expose minLength and maxLength in useArrayFieldInfo to use within the array component.
@iway1 Our code finds a mapping based on array type ignoring cardinality but the prop types map only if the mapping includes the exact cardinality. This makes the Unwrap unwrap array cardinality as well so the types match the code behavior. I added a test that only compiles with this unwrap change and also tested to make sure the code actually renders this mapping regardless of cardinality as well.
Alternatively we could make the code match the types and render a different mapping for different cardinality arrays but i think this is likely preferred. Maybe a good follow on would be to expose
minLength
andmaxLength
inuseArrayFieldInfo
to use within the array component.