Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AddCardLink: refine onclick #501

Open
jordanos opened this issue Apr 2, 2022 · 4 comments
Open

AddCardLink: refine onclick #501

jordanos opened this issue Apr 2, 2022 · 4 comments

Comments

@jordanos
Copy link

jordanos commented Apr 2, 2022

Is your feature request related to a problem? Please describe.
-When AddCardLink is supplied as a custom component there is no way to supply onclick callback function, lets say if I want to show modals when it is pressed.
-If i just add onclick method on the custom component and dispatch some action using redux. the dispatch function of does'nt pick up my app store instead reac-trello's store.. so things get a little complex

Describe the solution you'd like
A way to supply onclick callback function for AddCardLink.

@MarkoKurtovic
Copy link

MarkoKurtovic commented Apr 15, 2022

Hi @jordanos,

Do you know how to add link on title or somewhere else?

Best,

Marko

@jordanos
Copy link
Author

Hey @MarkoKurtovic .

Can you elaborate the question? Where do you wanna add the link.. is it on card titles?

@MarkoKurtovic
Copy link

Thanks for answering @jordanos

Yes, i just need simple redirect link on title.

Best,

Marko Kurtovic

@jordanos
Copy link
Author

okay @MarkoKurtovic
You can get that by creating a custom card component where you'll add a redirect link by wrapping the <CardTitle/>, Then supplying it as a prop like this:

const components = {
Card: CustomCard,
};
<Board components={components} />

You can create a custom card component using this format.
I've done the same stuff when I needed to customize the card for my use here check it out it might help you.

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

No branches or pull requests

2 participants