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

[REACT] Error when data loaded with loadCrudManagerData #8889

Open
chuckn0rris opened this issue Mar 26, 2024 · 1 comment
Open

[REACT] Error when data loaded with loadCrudManagerData #8889

chuckn0rris opened this issue Mar 26, 2024 · 1 comment
Assignees
Labels
bug Something isn't working forum Issues from forum high-priority Urgent to have fixed large-account Reported by large customer OEM OEM customer react React framework integration

Comments

@chuckn0rris
Copy link

chuckn0rris commented Mar 26, 2024

Forum post

Hi there,

We're currently working on loading new Gantt data following a fetch from the server. Here's our approach: we place the response data into the Redux store. Then, within a useEffect hook, we listen for changes in the store and update a useState variable with this data, subsequently passing it to the Gantt component.

const currentGantt = useSelector(selectCurrentGantt);
const [ganttData, setGanttData] = useState<any>({});

useEffect(() => {
  setGanttData(currentGantt);
}, [currentGantt]);

However, we're encountering an error:

Unhandled Runtime Error
TypeError: Cannot add property fromEvent, object is not extensible

This error arises from the following source:
app/components/schedules/gantt/gantt.component.tsx (47:48) @ loadCrudManagerData

Here's where the issue occurs:

const initGantt = async () => {
  await ganttRef.current.instance.crudManager.loadCrudManagerData(ganttData);
}

We've also attached the JSON response data for your reference.

Thank you in advance for any assistance you can provide.
runnable-test.zip

@chuckn0rris chuckn0rris added bug Something isn't working forum Issues from forum large-account Reported by large customer OEM OEM customer react React framework integration labels Mar 26, 2024
@matsbryntse matsbryntse added the high-priority Urgent to have fixed label Mar 26, 2024
@jsakalos
Copy link

This issue will be fixed with the fix of #8973

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working forum Issues from forum high-priority Urgent to have fixed large-account Reported by large customer OEM OEM customer react React framework integration
Projects
None yet
Development

No branches or pull requests

3 participants