Skip to content

Why onClick and columns function not working? #142

Closed Locked Answered by igordanchenko
tolyle asked this question in Q&A
Discussion options

You must be logged in to vote

How should I implement onClick in the custom component? Is it implemented in the NextJsImage component in the sentence renderPhoto={NextJsImage}? But I tried it and didn't know how to start.

Here is how the onClick prop is implemented in Next.js image example on the documentation website.

But you are not using the onClick prop at all in your implementation.

but the number of images appearing on the page will be greater than 3 columns, which is not the maximum 3 columns allowed by my settings.

You are using "rows" layout, hence the "columns" prop is not applicable in your case.

Replies: 6 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@igordanchenko
Comment options

Answer selected by igordanchenko
Comment options

You must be logged in to vote
2 replies
@tolyle
Comment options

@igordanchenko
Comment options

Comment options

You must be logged in to vote
1 reply
@igordanchenko
Comment options

Comment options

You must be logged in to vote
1 reply
@tolyle
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants