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

Error on Custom View for React #7207

Closed
1 task done
white3km opened this issue Feb 13, 2023 · 4 comments
Closed
1 task done

Error on Custom View for React #7207

white3km opened this issue Feb 13, 2023 · 4 comments
Assignees
Labels
Confirmed React Only View API Custom views, view-specific options, view triggers
Milestone

Comments

@white3km
Copy link

Reduced Test Case

https://codesandbox.io/s/full-calendar-v6-custom-view-rwsq7y

Do you understand that if a reduced test case is not provided, we will intentionally delay triaging of your ticket?

  • I understand

Which connector are you using (React/Angular/etc)?

React

Bug Description

Similar to #7120

For version 6.1.4, when a custom view is provided an error is returned when trying to view the custom view.
/node_modules/preact/dist/preact.module.js
TypeError - Cannot add property __, object is not extensible

@acerix acerix added Confirmed View API Custom views, view-specific options, view triggers React Only labels Feb 16, 2023
@jayldce
Copy link

jayldce commented Apr 22, 2023

Could someone please update on this issue? When can we expect fix for the same.

@sahilalam0
Copy link

Hi , can we know when can we expect the fix for it as i was facing the same issue ?

@arshaw arshaw modified the milestones: next-release, v6.1.8 May 24, 2023
@arshaw
Copy link
Member

arshaw commented May 25, 2023

Using view.[custom-name].component was never supposed to work. That is reserved for internal use. If you change it to content it should work. Example:
https://codesandbox.io/s/full-calendar-v6-custom-view-forked-95c8uj?file=/src/CustomViewPlugin.tsx

However, I understand many people look at the official plugins' source code for inspiration on how to write a custom view. So, in v6.1.8 I've mapped component -> content when this scenario is detected. Example:
https://stackblitz.com/edit/github-woxsdv?file=src%2FDemoApp.jsx
(I had to convert to stackblitz because codesandbox doesn't work well for me)

Please let me know if all this is okay.

@arshaw arshaw closed this as completed May 25, 2023
@ajuanjojjj
Copy link

ajuanjojjj commented Sep 8, 2023

Apologies if this is unrelated to the issue here, I'm just starting with react and I'm kinda lost generally speaking;

The official docs suggest using creating a customView that extends React.Component. This does not seem to work (at least using typescript); I get all sorts of errors when doing so.

The example @arshaw provided doesn't even seem to be using the imported React reference, so, are the docs outdated/wrong? Did I just mess up some of the generics (TS) on React.Component?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Confirmed React Only View API Custom views, view-specific options, view triggers
Projects
None yet
Development

No branches or pull requests

6 participants