Browse Source

refactor focus method

pull/9392/head
mehmet-erim 5 years ago
parent
commit
3fe3026860
  1. 11
      npm/ng-packs/packages/theme-shared/extensions/src/lib/components/extensible-form/extensible-form-prop.component.ts

11
npm/ng-packs/packages/theme-shared/extensions/src/lib/components/extensible-form/extensible-form-prop.component.ts

@ -1,10 +1,4 @@
import {
ABP,
AbpValidators,
AutofocusDirective,
ConfigStateService,
TrackByService,
} from '@abp/ng.core';
import { ABP, AbpValidators, ConfigStateService, TrackByService } from '@abp/ng.core';
import {
AfterViewInit,
ChangeDetectionStrategy,
@ -131,8 +125,7 @@ export class ExtensibleFormPropComponent implements OnChanges, AfterViewInit {
ngAfterViewInit() {
if (this.first && this.fieldRef) {
const autofocusDirective = new AutofocusDirective(this.fieldRef);
autofocusDirective.ngAfterViewInit();
this.fieldRef.nativeElement.focus();
}
}

Loading…
Cancel
Save