function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Bosede Omolayo 16Bosede Omolayo 16 

Lightning Web Component - Parent/Child Custom Object: Chevron/Path Label Dynamic Update

Lightning Web Component - Parent/Child Custom Object: Chevron/Path Label Dynamic Update

Parent has array object:

//-CustomPath- array of object
    @track pathValues = [
        { value: "A", label: "A", nav: "A" },
        { value: "B", label: "X", nav: "B" },
    ];

Child has public property:
@api pathValues;

Parent:
Update label for second element in  array from "X" to “B” – Done successfully – can see the update in console.log
But the refresh does not happen in Child because we are getting the value from the Parent through the public property @api pathValues

Question:
How can I make the refresh happen in the child so that the chevron label is updated from "X" to “B” in the child when change occurs in the parent?

Thank you.
ShirishaShirisha (Salesforce Developers) 
Hi Bosede,

Greetings!

Can you please try by using the refreshview in LWC to refresh the child record since you can see the child is getting updated successfully but not able to get the recent data from the child as it is not getting refreshed.

https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.apex

Kindly let me know if it helps you and close your query by marking it as best answer so that it can help others in the future.

Warm Regards,
Shirisha Pathuri