Skip to content

Function updateTemplate doesn't work #169

Open
@bitoffluff1

Description

Describe the bug
I create a MapTemplate in the Android Auto part, and then I want to update the information. For example, the header title. I call updateTemplate with the new config, but the MapTemplate is not updated. My goal is to update an already rendered template in some way. I only found the updateTemplate function for Android. Are there other ways to do this that work?

To Reproduce
Steps to reproduce the behavior:

  1. Create any template
    const config = {
    component: Map,
    header: { title: 'mapHeader' },
    items: [ { text: 'item-1', id: '2', browsable: true } ],
    actions: [ { title: 'testAction', type: 'custom', id: 'testAction' } ],
    };
    const mapTemplate = new MapTemplate(config);
    CarPlay.pushTemplate(mapTemplate);

  2. After a while call updateTemplate with new config
    mapTemplate.updateTemplate({
    ...config,
    header: { title: 'new title' },
    });

The title hasn't changed

Expected behavior
Updating an already rendered template

Android Auto (please complete the following information):

  • Device: [e.g. Pixel 8 / emulator] DHU emulator + pixel 5a
  • Android Version: [e.g. iOS8.1] 14
  • RNCarPlay version [e.g. 2.4.0] 2.4.0-beta.2

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions