<commit_before>import {Injectable, OnDestroy, Optional} from '@angular/core';
import { RootService } from 'ng2-qgrid/infrastructure/component/root.service';

@Injectable()
export class FocusAfterRender implements OnDestroy {
	private off;

	constructor(@Optional() root: RootService) {
		this.off = root.model['sceneChanged'].on(e => {
			if (e.state.status === 'stop') {
				root.table.view.focus();
			}
		});
	}

	ngOnDestroy() {
		this.off();
	}
}<commit_msg>ref. focus service<commit_after>import {Injectable, OnDestroy, Optional} from '@angular/core';
import { RootService } from 'ng2-qgrid/infrastructure/component/root.service';

@Injectable()
export class FocusAfterRender implements OnDestroy {
	private off;

	constructor(@Optional() root: RootService) {
		this.off = root.model.sceneChanged.on(e => {
			if (e.state.status === 'stop') {
				root.table.view.focus();
			}
		});
	}

	ngOnDestroy() {
		this.off();
	}
}
{'fraction_non_alphanumeric': 0.16163793103448276, 'fraction_numerical': 0.0021551724137931034, 'mean_word_length': 4.497041420118343, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '7632321', 'n_tokens_mistral': 326, 'n_tokens_neox': 304, 'n_words': 60}