<commit_before>import { Component, ElementRef, HostBinding, Input, ViewChild, ViewContainerRef, ChangeDetectorRef, OnDestroy } from '@angular/core';

@Component({
    selector: 'igx-virtual-helper',
    template: '<div #container class="igx-vhelper__placeholder-content" [style.height.px]="height"></div>'
})
export class VirtualHelperComponent implements OnDestroy {
    @HostBinding('scrollTop')
    public scrollTop;

    @ViewChild('container', { read: ViewContainerRef }) public _vcr;
    @Input() public itemsLength: number;
    public height: number;

    @HostBinding('class')
    public cssClasses = 'igx-vhelper--vertical';

    public destroyed;

    constructor(public elementRef: ElementRef, public cdr: ChangeDetectorRef) { }

    public ngOnDestroy() {
        this.destroyed = true;
    }

}<commit_msg>fix(igxGrid): Fix scroll event when changing height of content not being fired before scrollbar is hidden. #4304<commit_after>import { Component, ElementRef, HostBinding, Input, ViewChild, ViewContainerRef, ChangeDetectorRef, OnDestroy } from '@angular/core';

@Component({
    selector: 'igx-virtual-helper',
    template: '<div #container class="igx-vhelper__placeholder-content" [style.height.px]="height"></div>'
})
export class VirtualHelperComponent implements OnDestroy {
    @HostBinding('scrollTop')
    public scrollTop;

    @ViewChild('container', { read: ViewContainerRef }) public _vcr;
    @Input() public itemsLength: number;

    public set height(value) {
        if (this.destroyed) {
            return;
        }
        this._height = value;
        this.cdr.detectChanges();
    }

    public get height() {
        return this._height;
    }

    @HostBinding('class')
    public cssClasses = 'igx-vhelper--vertical';

    public destroyed;
    private _height: number;

    constructor(public elementRef: ElementRef, public cdr: ChangeDetectorRef) { }

    public ngOnDestroy() {
        this.destroyed = true;
    }

}
{'fraction_non_alphanumeric': 0.11767702496179318, 'fraction_numerical': 0.0020376974019358125, 'mean_word_length': 3.8374384236453203, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7324069', 'n_tokens_mistral': 561, 'n_tokens_neox': 545, 'n_words': 140}