diff --git a/packages/react-native-carplay/src/templates/InformationTemplate.ts b/packages/react-native-carplay/src/templates/InformationTemplate.ts index 55d40e83..71fc453b 100644 --- a/packages/react-native-carplay/src/templates/InformationTemplate.ts +++ b/packages/react-native-carplay/src/templates/InformationTemplate.ts @@ -31,10 +31,12 @@ export class InformationTemplate extends Template { } public updateInformationTemplateItems = (items: InformationItem[]) => { + this.config.items = items; return CarPlay.bridge.updateInformationTemplateItems(this.id, this.parseConfig(items)); }; public updateInformationTemplateActions = (actions: InformationAction[]) => { + this.config.actions = actions; return CarPlay.bridge.updateInformationTemplateActions(this.id, this.parseConfig(actions)); }; } diff --git a/packages/react-native-carplay/src/templates/ListTemplate.ts b/packages/react-native-carplay/src/templates/ListTemplate.ts index 0d8f121b..3123a389 100644 --- a/packages/react-native-carplay/src/templates/ListTemplate.ts +++ b/packages/react-native-carplay/src/templates/ListTemplate.ts @@ -98,10 +98,12 @@ export class ListTemplate extends Template { } public updateSections = (sections: ListSection[]) => { + this.config.sections = sections; return CarPlay.bridge.updateListTemplateSections(this.id, this.parseConfig(sections)); }; public updateListTemplateItem = (config: ListItemUpdate) => { + this.config.sections[config.sectionIndex].items[config.itemIndex] = config; return CarPlay.bridge.updateListTemplateItem(this.id, this.parseConfig(config)); }; diff --git a/packages/react-native-carplay/src/templates/MapTemplate.ts b/packages/react-native-carplay/src/templates/MapTemplate.ts index 66198284..a8e75e83 100644 --- a/packages/react-native-carplay/src/templates/MapTemplate.ts +++ b/packages/react-native-carplay/src/templates/MapTemplate.ts @@ -119,10 +119,12 @@ export class MapTemplate extends Template { * Update MapTemplate configuration */ public updateConfig(config: MapTemplateConfig) { + this.config = config; CarPlay.bridge.updateMapTemplateConfig(this.id, this.parseConfig(config)); } public updateMapButtons(mapButtons: MapButton[]) { + this.config.mapButtons = mapButtons; CarPlay.bridge.updateMapTemplateMapButtons(this.id, this.parseConfig(mapButtons)); } diff --git a/packages/react-native-carplay/src/templates/TabBarTemplate.ts b/packages/react-native-carplay/src/templates/TabBarTemplate.ts index 9433f41a..674f521f 100644 --- a/packages/react-native-carplay/src/templates/TabBarTemplate.ts +++ b/packages/react-native-carplay/src/templates/TabBarTemplate.ts @@ -46,6 +46,7 @@ export class TabBarTemplate extends Template { } public updateTemplates = (config: TabBarTemplateConfig) => { + this.config = config; return CarPlay.bridge.updateTabBarTemplates(this.id, this.parseConfig(config)); }; }