trimble-oss / modus-web-components

This library provides Modus components as web components - reusable, encapsulated UI elements that are framework agnostic (can be implemented in any site).
https://modus-web-components.trimble.com/
MIT License
30 stars 65 forks source link

[Modus-table] tableCore is called before it's initialized #2507

Closed janwiebe-glasbergen closed 1 week ago

janwiebe-glasbergen commented 1 month ago

Prerequisites

Describe the issue

When using the modus table component an error occurs in the console:

TypeError: Cannot read properties of undefined (reading 'setState')
    at ModusTable.onDataChange (modus-table.entry.js:3931:24)
    at index-8e730124.js:1811:54
    at Array.map (<anonymous>)
    at setValue (index-8e730124.js:1808:34)
    at HostElement.set [as data] (index-8e730124.js:1859:25)
    at NoneEncapsulationDomRenderer.setProperty (platform-browser.mjs:645:17)
    at elementPropertyInternal (core.mjs:10980:18)
    at Module.ɵɵproperty (core.mjs:21752:9)

This seems to occur because the tableCore of the modus-table is used before it's intialized.

Reduced test cases

The issue is reproducible by going to https://modus-web-components.trimble.com/?path=/story/components-table--default and switch to the hover option Bug

What operating system(s) are you seeing the problem on?

Windows

What browser(s) are you seeing the problem on?

Chrome

What is the issue regarding ?

@trimble-oss/modus-web-components

What version of npm package are you using ?

0.22.0

Priority

Medium

What product/project are you using Modus Components for ?

Nova / Construction calculation platform UI

What is your team/division name ?

ACDC

Are you willing to contribute ?

No

Are you using Modus Web Components in production ?

No response

github-actions[bot] commented 1 month ago

Hello @janwiebe-glasbergen! Thanks for opening an issue. The Modus core team will get back to you soon (usually within 24-hours) and provide guidance on how to proceed. Contributors are welcome to participate in the discussion and provide their input on how to best solve the issue, and even submit a PR if they want to.

Please wait until the issue is ready to be worked on before submitting a PR, or you can reach out to the core team if it is time bound. For trivial things, or bugs that don't change the expected behaviors and UI, you can go ahead and make a PR.

sami-raboun commented 3 weeks ago

@cjwinsor Any updates on this? We are also running into this.