GridLayout中具有组的NativeScript Angular RadDataForm不会展开以显示iOS上的字段

时间:2019-12-24 05:13:55

标签: ios angular layout nativescript

我在Angular NativeScript(6.3.0)组件中具有此XML,并且在点击组标题时,表单组在Android上可以正确展开和缩小。

在iOS上,如果使用GridLayout rows =“ auto”,则该组不会扩展;如果使用rows =“ *”,则该组不会收缩。

<GridLayout rows="auto">
    <RadDataForm row="0" [source]="address">
        <TKPropertyGroup tkDataFormGroups collapsible="true" name="Edit this address" collapsed="true">
            <TKEntityProperty tkPropertyGroupProperties name="address" hintText="address" index="0">
                <TKPropertyEditor tkEntityPropertyEditor type="Text"></TKPropertyEditor>
            </TKEntityProperty>
            <TKEntityProperty tkPropertyGroupProperties name="address2" index="1">
                <TKPropertyEditor tkEntityPropertyEditor type="Text"></TKPropertyEditor>
            </TKEntityProperty>
            <TKEntityProperty tkPropertyGroupProperties name="city" index="2">
                <TKPropertyEditor tkEntityPropertyEditor type="Text"></TKPropertyEditor>
            </TKEntityProperty>
            <TKEntityProperty tkPropertyGroupProperties name="state" index="3">
                <TKPropertyEditor tkEntityPropertyEditor type="Text"></TKPropertyEditor>
            </TKEntityProperty>
            <TKEntityProperty tkPropertyGroupProperties name="postcode" index="4">
                <TKPropertyEditor tkEntityPropertyEditor type="Text"></TKPropertyEditor>
            </TKEntityProperty>
            <TKEntityProperty tkPropertyGroupProperties name="country" index="5">
                <TKPropertyEditor tkEntityPropertyEditor type="Text"></TKPropertyEditor>
            </TKEntityProperty>
        </TKPropertyGroup>
    </RadDataForm>
</GridLayout>

是否还有其他人遇到过这个问题,或者我是否缺少一些标记以使其能够按我认为的那样工作?

1 个答案:

答案 0 :(得分:0)

展开视图后,您可以在RadDataForm上强制重新布局。

<RadDataForm row="0" [source]="address"
    (groupExpanded)="onGroupExpanded($event)">


onGroupExpanded(event) {
    event.object.requestLayout();
}

Playground Sample