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

Function updateTemplate doesn't work #169

Open
bitoffluff1 opened this issue Feb 22, 2024 · 1 comment
Open

Function updateTemplate doesn't work #169

bitoffluff1 opened this issue Feb 22, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@bitoffluff1
Copy link

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
@bitoffluff1 bitoffluff1 added the bug Something isn't working label Feb 22, 2024
@purwanto2205
Copy link

any update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants