@bigopon - I see that you are a contributor on the aurelia-ui-framework, do you have any idea why I would be receiving the error:
Possible Unhandled Promise Rejection: TypeError: Cannot read property 'attrToRemove' of undefined
when adding the plugin into main.ts? I have tried using useResource and am able to add UIResources.Buttons and UIResources.Menus ok, but the error happens when adding UIResources.DataPanel. I am trying to use the grid and it is part of the DataPanel.
1 Like
to fix this, you need register aurelia-ui-virtualization
in your main.ts
(it should be before aurelia-ui-framework
)
2 Likes
Thanks, that resolved the issue.
2 Likes
Well I guess I spoke too soon. It seems to have gotten rid of that error, but now after adding in the .useResource(UIResources.DataPanel) I am getting this error.
index.js?f309:248 Possible Unhandled Promise Rejection: TypeError: Cannot read property 'attrToRemove' of undefined at ViewCompiler._compileElement (aurelia-templating.js?78cb:3081) at ViewCompiler._compileNode (aurelia-templating.js?78cb:2776) at ViewCompiler._compileElement (aurelia-templating.js?78cb:3096) at ViewCompiler._compileNode (aurelia-templating.js?78cb:2776) at ViewCompiler._compileNode (aurelia-templating.js?78cb:2798) at ViewCompiler.compile (aurelia-templating.js?78cb:2745) at eval (aurelia-templating.js?78cb:3479) at eval (index.js?f309:57) at run (setImmediate.js?bdcd:40) at runIfPresent (setImmediate.js?bdcd:69)
@avrahamcool, I donât have anything in my html file that would be throwing it off. I have tried it with a grid in the html file as well.
1 Like
Please share the content of your âmain.tsâ file.
1 Like
`
import âaurelia-ui-virtualizationâ
import {Aurelia} from âaurelia-frameworkâ
import environment from â./environmentâ
import {PLATFORM} from âaurelia-palâ
import { UIFrameworkConfig, UIResources } from âaurelia-ui-frameworkâ
export function configure(aurelia: Aurelia) {
aurelia.use
.standardConfiguration()
.feature(PLATFORM.moduleName(âresources/indexâ));
aurelia.use.developmentLogging(environment.debug ? âdebugâ : âwarnâ);
aurelia.use.plugin(PLATFORM.moduleName(âaurelia-ui-frameworkâ), (config: UIFrameworkConfig) => {
config
.useResource(UIResources.Buttons)
.useResource(UIResources.DataPanel)
});
// .setApiBaseUrl("/api")
// .useResource(UIResources.DataPanel)
// .useResource(UIResources.Buttons)
// .useStandardResources();
if (environment.testing) {
aurelia.use.plugin(PLATFORM.moduleName(âaurelia-testingâ));
}
aurelia.start().then(() => aurelia.setRoot(PLATFORM.moduleName(âappâ)));
}
`
1 Like
remove import âaurelia-ui-virtualizationâ
.
instead - register the virtualization plugin - before aurelia-ui-framework
aurelia.use.plugin(PLATFORM.moduleName(âaurelia-ui-virtualizationâ);
aurelia.use.plugin(PLATFORM.moduleName(âaurelia-ui-frameworkâ) âŠ
2 Likes