Skip to content
This repository has been archived by the owner on Nov 8, 2024. It is now read-only.

Attributes#onElementLinkClick should receive minim element #466

Open
opichals opened this issue Jul 16, 2018 · 2 comments
Open

Attributes#onElementLinkClick should receive minim element #466

opichals opened this issue Jul 16, 2018 · 2 comments

Comments

@opichals
Copy link
Contributor

Based on #462 the onElementLinkClick() method is inconsistent when minim Element is used as input as it returns refract serialization as the second argument.

   this.context.onElementLinkClick(element.meta.id, element, event)
@opichals opichals changed the title Attributes.onElementLinkClick should receive minim element Attributes#onElementLinkClick should receive minim element Jul 16, 2018
@opichals
Copy link
Contributor Author

opichals commented Jul 17, 2018

In order for the internally rendered link tags to be consistent with the application it is being used in (e.g. to contain proper href attribute value or to have application-provided onClick handler), the interface could be changed so that optionally a data structure link renderer function is passed in (currently the is a hard-coded ParentInfoLink component).

For example as follows:

<Attrbutes renderDataStructureLink={this.renderDataStructureLinkTag} />

@char0n
Copy link

char0n commented Jul 17, 2018

Parametrize the link renderer seems to be better and more flexible option

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants