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

Support Angular 15? Issue with setDisabledState #112

Open
djdmorrison opened this issue Jan 20, 2023 · 8 comments
Open

Support Angular 15? Issue with setDisabledState #112

djdmorrison opened this issue Jan 20, 2023 · 8 comments
Assignees
Labels

Comments

@djdmorrison
Copy link

Hello,

Thanks for the Angular wrapper!

We've updated our app to Angular 15 but facing an error with jodit-angular. The package worked fine with Angular 14 so it's a recent update.

The error is Cannot read properties of undefined (reading 'setReadOnly'). This is thrown when setDisabledState() is called.

I believe the breaking change in Angular is the following: "In Angular 15, the setDisabledState is called when a ControlValueAccessor is attached. To avert using the same behavior, use FormsModule.withConfig or ReactiveFormsModule.withConfig."

A quick fix is to add a guard to setDisabledState() to check editor is defined.

setDisabledState(isDisabled: boolean): void {
    if (!this.editor) return; // guard to check if editor is defined.
    this.editor.setReadOnly(isDisabled);
}

I would submit a PR but not sure what else needs changing so just calling out this fix and hoping for a new version soon. Thanks!

@juanfv2
Copy link

juanfv2 commented Jan 20, 2023

@djdmorrison , where I can change that? I have the same error.

@MrElectroNick
Copy link
Collaborator

Hi @djdmorrison @juanfv2 - fix will arrive within next couple days. Issue is confirmed. I'll let you know here when version for A15 will be published. Thanks for reporting!

@MrElectroNick MrElectroNick self-assigned this Jan 24, 2023
@thibaut129
Copy link

Hi @MrElectroNick,

Any news about this bug ?
Thanks a lot :)

@ptatoChi
Copy link

Hello! When will the angular 15 support happen? :) Angular 16 is also around the corner. hope that gets supported too

@Raw-Gel
Copy link

Raw-Gel commented Oct 4, 2023

HI any update regarding on this issue? I'm still encountering the problem

@MrElectroNick
Copy link
Collaborator

Hi @Raw-Gel - unfortunately project where jodit-angular is used with my supervision is still on angular 14 and I don't have enough time to handle builds for v15 and v16 along with fixing this issue. It would be good if someone can help. In any case at some point builds will arrive but I can't predict when

@pedrochaves86
Copy link

Hello. There is any prediction to launch a version for Angular 15, 16? Just migrated to Angular 15 and getting the same reported error.

@MrElectroNick
Copy link
Collaborator

Hi @pedrochaves86 @juanfv2 @djdmorrison @thibaut129 - this issue is currently in work (FINALLY)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants