-
Notifications
You must be signed in to change notification settings - Fork 625
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
Why there is no href="#" attribute by default? #242
Comments
For accessibility purposes. Why do you need to do that? |
@AdeleD if you're paginating with a custom server and router so each pagination link renders a new page, then having href attributes would definitely help |
Hi, This is now possible thanks to the Sample usage: <ReactPaginate
...
hrefBuilder={(page, pageCount, selected) =>
page >= 1 && page <= pageCount ? `/page/${page}` : '#'
}
hrefAllControls
/> Note the |
Hello i want to assign per page to params of url ,it like this : localhost:3000/home/1 or localhost:3000/home/2, .... until end of page . how can i should do and can anyone help me for this ? thanks |
Hi @GiangVipPro, You have an example just above. Add a prop <ReactPaginate
...
hrefBuilder={(page, pageCount, selected) =>
page >= 1 && page <= pageCount ? `/home/${page}` : '#'
}
hrefAllControls
/> |
hi @MonsieurV I did as you said but the url does not change. The console also appears href = # |
@DevZiya could you provide a running example on a GitHub repo for your issue? Thx |
import axios from "axios"; const Home = () => { useEffect(() => { useEffect(() => { const userPerPage = 10; const changePage = ({ selected }) => { const handleCart = (book) => { return (
); export default Home; |
Well, certainly check your condition @DevZiya ( This is not a bug in the library; and not the right place to help you debug your app. :) |
Is there a way to add href="#" to all items? I've tried with:
But this add only to non active elements the href tag. The reason is why i want href on Items, that if you double click, that the numbers don't get marked.
The text was updated successfully, but these errors were encountered: