pubsub icon indicating copy to clipboard operation
pubsub copied to clipboard

`samePageRef` compares references to the objects of PageRef

Open awesomeandrey opened this issue 4 years ago • 1 comments

Hello

The samePageRef method points to object references rather then making match by value.

Screenshot at Nov 10 18-58-17

Expected adjustment:

image

Steps to Reproduce

  1. Create Aura component (A) for the standalone page (should be url addressable, implement flexipage:availableForAllPageTypes )
  2. For component (A) write custom logic to open the modal window through overlayLib, dynamically instantiate another Aura component (B) and nest it into the modal body
  3. Fire custom event via pubSub from component (B), and try to handle it in component (A)

awesomeandrey avatar Nov 10 '21 17:11 awesomeandrey

I'm using this with LWCs (i.e. not Aura components) and both pageRefs don't always have attributes either. I created a workaround where I added the recordId as a payload prop and compared it recordId of the receiving component.

MattSynaptic avatar Apr 18 '22 13:04 MattSynaptic