You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.
return(<PersonContactOnProfileJumpWrapperkey={contactPG.getPointerKeyForReact()}onPersonContactClick={onContactClick}personPG={contactPG}filterText={self.state.filterText}/>)/** * Return a string key for the current pointer. * This is useful for React to be able to associate a key to each relation to avoid recreating dom nodes * Note that the key value must be unique or React can't handle this * @returns */// TODO not sure it's a good idea neither if it's well implemented$rdf.PointedGraph.prototype.getPointerKeyForReact=function(){if(this.pointer.termType=='bnode'){return"BNode-"+this.pointer.id;// TODO not sure it's a good idea (?)}elseif(this.pointer.termType=='symbol'){returnthis.pointer.value;}else{// TODO for literals we re render???return"Literal-TODO-"+Math.random().toString(36).substring(7);}}
It may not be an ideal implementation, particularly for blank nodes.
We should think about what would be a good "key" implementation.
If we follow a foaf:knows relation for exemple, we should be able to associate an unique key for each pg returned.
The default behavior is probably to never do the association so it's kind of using a random I guess (this is why it's somehow implemented this way)
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
See http://facebook.github.io/react/docs/multiple-components.html#dynamic-children
Using a key attribute is useful.
I've provided a simple implementation:
It may not be an ideal implementation, particularly for blank nodes.
We should think about what would be a good "key" implementation.
If we follow a foaf:knows relation for exemple, we should be able to associate an unique key for each pg returned.
The default behavior is probably to never do the association so it's kind of using a random I guess (this is why it's somehow implemented this way)
The text was updated successfully, but these errors were encountered: