Dynamic Attrs for Link in my schema


#1

Hello, thank you for all of your hard work on this project!

Our users can assign any attributes they want to Links, and the FE code doesn’t know ahead of time what those attributes can (they can make up their own data attributes). How should I handle this in the schema? I’m not sure what to put in the attrs field?

Thank you, Trey


#2

You could create a node attribute called linkAttributes, or similar, and store an object with the custom attributes in there.


#3

Awesome! I was actually trying that so good to know I am headed in the right direction!

Thank you again for the quick response!! Trey