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

Missing calling when emit on clean Event #1

Open
tfSheol opened this issue Mar 11, 2021 · 0 comments
Open

Missing calling when emit on clean Event #1

tfSheol opened this issue Mar 11, 2021 · 0 comments
Assignees
Labels
1.0.4 v1.0.4 bug Something isn't working enhancement New feature or request

Comments

@tfSheol
Copy link
Owner

tfSheol commented Mar 11, 2021

Fix missing clean calling with :

ngAfterContentInit() {
        this.addSubscription(SubType.SYSTEM, this.clear.subscribe(() => {
            this.masterForms = [];
            this.data = {};
            this.container.clear();
            this.onError.emit([]);
            this.onValidate.emit(false);
            this.onData.emit({
                data: [],
                form: <FormGroup>{}
            });
            this.subscriptions.filter(sub => sub.type == SubType.DEFAULT).forEach(subscription => {
                if (!subscription.subscription.closed) {
                    subscription.subscription.unsubscribe();
                }
            });
        }));
        this.addSubscription(SubType.SYSTEM, this.render.subscribe(() => this.renderItem()));
        this.addSubscription(SubType.SYSTEM, this.reload.subscribe(() => {
            this.container.clear();
            this.renderItem();
        }));
    }
@tfSheol tfSheol added bug Something isn't working enhancement New feature or request 1.0.4 v1.0.4 labels Mar 11, 2021
@tfSheol tfSheol self-assigned this Mar 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.0.4 v1.0.4 bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant