Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): ActionItem with nested child threw errors on rendering. #9821

Merged

Conversation

CatchABus
Copy link
Contributor

@CatchABus CatchABus commented Mar 10, 2022

PR Checklist

What is the current behavior?

If one tries to nest an element inside ActionItem an exception is thrown.
This error is only thrown when action items are nested inside ActionBar.actionItems.
It seems there is a bug in xml2ui module regarding complex properties (ListView.itemTemplate, ActionBar.actionItems, etc).

This will work

<Page.actionBar>
    <ActionBar>
        <!-- Creating custom views for ActionItem-->
        <ActionItem ios.position="right">
                <Button text="Theme"  />
        </ActionItem>
    </ActionBar>
</Page.actionBar>

but this will throw error

<Page.actionBar>
    <ActionBar>
        <ActionBar.actionItems>
            <!-- Creating custom views for ActionItem-->
            <ActionItem ios.position="right">
                    <Button text="Theme"  />
            </ActionItem>
        </ActionBar.actionItems>
    </ActionBar>
</Page.actionBar>

What is the new behavior?

An attempt to fix bug in xml2ui.
This fix allows ActionItems to accept a nested child as described in the docs here: https://v6.docs.nativescript.org/ui/components/action-bar#styling

@cla-bot cla-bot bot added the cla: yes label Mar 10, 2022
@CatchABus CatchABus changed the title fix: ActionItem rendering threw errors if it had a nested child. fix: ActionItem with nested child threw errors on rendering. Mar 10, 2022
@CatchABus CatchABus changed the title fix: ActionItem with nested child threw errors on rendering. fix(core): ActionItem with nested child threw errors on rendering. Mar 10, 2022
@NathanWalker NathanWalker merged commit efa80c7 into NativeScript:master Mar 19, 2022
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants