react-carousel icon indicating copy to clipboard operation
react-carousel copied to clipboard

Prevent first/last pages from sliding further than the carousel's borders

Open a-nozeret opened this issue 6 years ago • 29 comments

Issuehunt badges

Feature

New Prop to stick first/last CarouselItems to the edges, regardless of the value of centered prop, always displaying a full page.

Context

When slidesPerPage is greater than 1, reaching the first or last element adds unnecessary blank space. Instead, getTransformOffset() could prevent the carousel from sliding further, allowing the entire page to remain visible (respecting slidesPerPage at all times).

Unwanted behaviour:

CodePen: https://codepen.io/anoz/pen/OJVmBxB

Screenshot 2020-02-28 at 16 36 45


IssueHunt Summary

Backers (Total: $0.00)

Submitted pull Requests


Become a backer now!

Or submit a pull request to get the deposits!

Tips

a-nozeret avatar Feb 28 '20 16:02 a-nozeret

@a-nozeret

Thanks for reporting. I think the example below, possible to reproduce in the docs, is the same issue.

<Carousel
  centered
  arrows
  addArrowClickHandler
  slidesPerPage={4}
  slidesPerScroll={4}
>
 <img src={imageOne} />
 <img src={imageTwo} />
 <img src={imageThree} />
</Carousel>
Screenshot 2020-02-28 at 17 44 13

I think it may be also related to this mobile issue https://github.com/brainhubeu/react-carousel/issues/181

Maybe we'll fix this issue but you're PR is more than welcome.

piotr-s-brainhub avatar Feb 28 '20 16:02 piotr-s-brainhub

@piotr-s-brainhub has funded $15.00 to this issue.


issuehunt-oss[bot] avatar Mar 20 '20 16:03 issuehunt-oss[bot]

@piotr-s-brainhub has funded $1.00 to this issue.


issuehunt-oss[bot] avatar Apr 06 '20 20:04 issuehunt-oss[bot]

@piotr-s-brainhub has cancelled funding for this issue.(Cancelled amount: $15.00) See it on IssueHunt

issuehunt-oss[bot] avatar May 14 '20 00:05 issuehunt-oss[bot]

@piotr-s-brainhub has cancelled funding for this issue.(Cancelled amount: $1.00) See it on IssueHunt

issuehunt-oss[bot] avatar May 14 '20 00:05 issuehunt-oss[bot]

@piotr-s-brainhub has funded $3.00 to this issue.


issuehunt-oss[bot] avatar May 14 '20 14:05 issuehunt-oss[bot]

@piotr-s-brainhub has funded $3.00 to this issue.


issuehunt-oss[bot] avatar May 27 '20 15:05 issuehunt-oss[bot]

@piotr-s-brainhub has funded $2.00 to this issue.


issuehunt-oss[bot] avatar Jun 03 '20 13:06 issuehunt-oss[bot]

@piotr-s-brainhub has funded $32.00 to this issue.


issuehunt-oss[bot] avatar Jun 23 '20 21:06 issuehunt-oss[bot]

@piotr-s-brainhub has funded $15.00 to this issue.


issuehunt-oss[bot] avatar Jul 02 '20 09:07 issuehunt-oss[bot]

@piotr-s-brainhub has funded $2.00 to this issue.


issuehunt-oss[bot] avatar Jul 09 '20 22:07 issuehunt-oss[bot]

@piotr-s-brainhub has funded $5.00 to this issue.


issuehunt-oss[bot] avatar Jul 14 '20 23:07 issuehunt-oss[bot]

@aayush420

I leave the brainhubeu organization so I must remove the IssueHunt funding as it's only me who's able to manage these funds.

Moreover, the team decided on Thursday about stopping using IssueHunt but as you've already opened a PR maybe they'll agree to reward you. Please ask @RobertHebel , @humbak, @Lukasz-pluszczewski or other brainhubeu organization members.

piotr-s-brainhub avatar Jul 18 '20 20:07 piotr-s-brainhub

@piotr-s-brainhub has cancelled funding for this issue.(Cancelled amount: $3.00) See it on IssueHunt

issuehunt-oss[bot] avatar Jul 18 '20 20:07 issuehunt-oss[bot]

@piotr-s-brainhub has cancelled funding for this issue.(Cancelled amount: $3.00) See it on IssueHunt

issuehunt-oss[bot] avatar Jul 18 '20 20:07 issuehunt-oss[bot]

@piotr-s-brainhub has cancelled funding for this issue.(Cancelled amount: $2.00) See it on IssueHunt

issuehunt-oss[bot] avatar Jul 18 '20 20:07 issuehunt-oss[bot]

@piotr-s-brainhub has cancelled funding for this issue.(Cancelled amount: $32.00) See it on IssueHunt

issuehunt-oss[bot] avatar Jul 18 '20 20:07 issuehunt-oss[bot]

@piotr-s-brainhub has cancelled funding for this issue.(Cancelled amount: $15.00) See it on IssueHunt

issuehunt-oss[bot] avatar Jul 18 '20 20:07 issuehunt-oss[bot]

@piotr-s-brainhub has cancelled funding for this issue.(Cancelled amount: $2.00) See it on IssueHunt

issuehunt-oss[bot] avatar Jul 18 '20 20:07 issuehunt-oss[bot]

@piotr-s-brainhub has cancelled funding for this issue.(Cancelled amount: $5.00) See it on IssueHunt

issuehunt-oss[bot] avatar Jul 18 '20 20:07 issuehunt-oss[bot]

Hey @piotr-s-brainhub please merge and close #608 . It has the fix you need. You forgot to add the new prop stickyEdges to your code. And hey, why did you remove funding on issuehunt after the PR is submitted?

aayush420 avatar Jul 19 '20 04:07 aayush420

@aayush420

For me, it doesn't work correctly.

As I've previously mentioned, I'm leaving the brainhubeu organization so nobody would be able to reward it on IssueHunt.

Please contact @RobertHebel , @humbak, @Lukasz-pluszczewski, or other brainhubeu organization members so maybe one of them will re-assign funding and reward it to you.

piotr-s-brainhub avatar Jul 19 '20 22:07 piotr-s-brainhub

@aayush420 We are working on restoring funding for already opened PRs. On the next Thursday, I will be able to re-assign money for this issue. Is it ok for you to wait for the funding one week?

And regarding bug @piotr-s-brainhub has mentioned it's not caused by your code so I think everything looks 👍 .

RobertHebel avatar Jul 23 '20 09:07 RobertHebel

@aayush420 issue hunt for this issue will be recovered tomorrow, sorry for the delay also I've found one bug regarding stickyEdges prop on your PR

RobertHebel avatar Jul 30 '20 13:07 RobertHebel

@aayush420 issue hunt for this issue will be recovered tomorrow, sorry for the delay also I've found one bug regarding stickyEdges prop on your PR

Hey, Nice catch! #626 Addresses this new bug.

aayush420 avatar Jul 30 '20 16:07 aayush420

@roberthebel has funded $59.00 to this issue.


issuehunt-oss[bot] avatar Jul 31 '20 11:07 issuehunt-oss[bot]

Any update on this? Is anyone still working on this issue?

renato avatar Feb 24 '21 19:02 renato

Any update on this? Is anyone still working on this issue?

The PR is basically finished ages ago. The team is not finding time to merge it, it seems.

aayush420 avatar Feb 25 '21 01:02 aayush420

@roberthebel has cancelled funding for this issue.(Cancelled amount: $59.00) See it on IssueHunt

issuehunt-oss[bot] avatar Jul 01 '22 11:07 issuehunt-oss[bot]