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
Cannot extend classes in UMD version #192
Comments
Problem:
Conclusion: modelClass cannot be defined as es6 class with current UMD bundle due to babel output Should be possible using older approach with function inheritance. |
If you see error like:
To get it fixed you can try to change target from es2015 (modern) to es5 (legacy) in tsconfig.json |
@pmiklashevich Is there a workaround to this without rebuilding the bundle? |
We couldn't figure good workaround for this problem. As you can read in my post above it lies very deep in the code.
|
I thought of the first option and tried the answers in this SO post, but I end up with more obscure errors (we are still evaluating Bryntum Gantt so we don't have the source code yet) Could you give some basic example? Like how to extend |
Speaking of using babel, you can write model code in smth like babeljs.io/repl and copy paste result. I made a simple example, see here Speaking of extending fields, you can use smth like:
|
Oh, that's useful! And it works! Thanks a lot! That's a huge amount of code generated though. I understand why the UMD version is so much bigger 😲 About your example, using this:
I get this:
The taskStore config option on ProjectTask is not documented, but is a property though. |
Try this:
Also that is invalid field config and with valid field types this definition is basically default behavior. What result are you trying to achieve? |
No reproducible / not relevant after dropping IE11 support: |
Easily reproducible in Docs, update NavigationTree.js in docs app to:
See also this forum post: https://forum.bryntum.com/viewtopic.php?t=25985
The text was updated successfully, but these errors were encountered: