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

Actions buttons don't do anytning, silently fail. #2434

Open
4 of 5 tasks
Dujota opened this issue Aug 15, 2023 · 9 comments
Open
4 of 5 tasks

Actions buttons don't do anytning, silently fail. #2434

Dujota opened this issue Aug 15, 2023 · 9 comments
Labels

Comments

@Dujota
Copy link

Dujota commented Aug 15, 2023

Check that this is really a bug

  • I confirm

Reproduction link

https://codesandbox.io/p/github/Dujota/react-big-calendar-demo/demo-rbc?workspaceId=ce7615f6-1791-4730-b586-fee7cce16a0d

Bug description

I can get events to show up and month is the default view, but any of the action buttons on the top (next/back day/week/month/agenda) do not work. they silently fail.

Expected Behavior

you should be able to switch views and be able to navigate through calendar days/months/weeks

Actual Behavior

you get to landing view (default view chosen) and none of the action buttons work.

you can see events etc, but you cant navigate, there is no output in console. no warnings or errors.

onView={() => console.log("onView trigered, but its not doing anything. ")}. is being triggered as it console logs the

react-big-calendar version

"^1.8.1"

React version

18.2.0

Platform/Target and Browser Versions

macOS, Windows, Chrome, IOS

Validations

  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
  • Make sure this is a react-big-calendar issue and not an implementation issue

Would you like to open a PR for this bug?

  • I'm willing to open a PR
@Dujota Dujota added the bug label Aug 15, 2023
@cutterbl
Copy link
Collaborator

Your reproduction link gives me the following message
Unable to access this workspace
It is likely that you are not a member of the team that this project belongs to. To be able to access the web editor of this repository and edit the code, you need to be invited to the team.

@Dujota
Copy link
Author

Dujota commented Aug 16, 2023

@cutterbl my apologies, I have changed permissions, you can now view the sandbox.

@cutterbl
Copy link
Collaborator

@Dujota still getting the same message

@Dujota
Copy link
Author

Dujota commented Aug 17, 2023

@cutterbl for some reason codesandbox is not allowing me to share this, the repo imported is public, the sandbox is public, so im not sure what the deal is.

I have a repository that re-creates this issue, you can fork it and then bring it into your sandbox? maybe that can also work?

https://github.com/Dujota/react-big-calendar-demo

all you need is the env vars which are

.env file:

NEXTAUTH_URL="http://localhost:3000"

DISCORD_CLIENT_ID=""
DISCORD_CLIENT_SECRET=""

let me know if that works for you, in the meantime i sent a support ticket to codesandbox for their bug

@cutterbl
Copy link
Collaborator

I looked through your code and saw the following

onView={() =>
  console.log("on view triggered, but its not changing views")
}

A quick review of the view and onView documentation points out the issue here. The view can be either controlled or uncontrolled. By utilizing onView, you're telling Big Calendar that you will control the value of view.

@cutterbl
Copy link
Collaborator

Turns out this is an issue, though unsure why. Something in the app is clashing with the used version of uncontrollable. We can not, currently, update the dependency, as the HOC has been removed. For those running into the same issue, you can control the view (with onView), date (with onNavigate) and selected (with onSelectEvent) to get around the issue.

@cutterbl cutterbl reopened this Aug 17, 2023
@thebiltheory
Copy link

Same here.
Using this in the meantime.
https://jquense.github.io/react-big-calendar/examples/index.html?path=/docs/props--on-view

@CamiloGarciaLaRotta
Copy link

CamiloGarciaLaRotta commented Dec 24, 2023

++ I just installed the package and have this same issue

edit: In my case it was just a misunderstanding of the lib. I thought <Calendar/> would by default toggle the views. It turns out we gotta wire that behaviour ourselves. See the docs on onNavigate and onView

@SanjoSolutions
Copy link

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

No branches or pull requests

5 participants