Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Angular - Abp form field component#23971

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
erdemcaygor wants to merge11 commits intodev
base:dev
Choose a base branch
Loading
fromfeat/#23955
Draft
Show file tree
Hide file tree
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
style update
  • Loading branch information
@erdemcaygor
erdemcaygor committedOct 20, 2025
commit2d44ac9aa10ed27e8d34dd8db04c8056c1c30432

Some comments aren't visible on the classic Files Changed page.

View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
<div class="form-group" [formGroup]="abpInputFormGroup">
<div class="form-group" [ngClass]="containerClass()" [formGroup]="abpInputFormGroup">
<label [for]="id()" class="form-label">{{ label() | abpLocalization }}</label>
<input
[type]="type()"
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -23,6 +23,7 @@ import {
} from '@angular/forms';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
import { LocalizationPipe } from '@abp/ng.core';
import { CommonModule } from '@angular/common';

const ABP_INPUT_CONTROL_VALUE_ACCESSOR = {
provide: NG_VALUE_ACCESSOR,
Expand All@@ -34,7 +35,7 @@ const ABP_INPUT_CONTROL_VALUE_ACCESSOR = {
selector: 'abp-input',
templateUrl: './abp-input.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [ReactiveFormsModule, LocalizationPipe],
imports: [ReactiveFormsModule,CommonModule,LocalizationPipe],
exportAs: 'abpInput',
host: {
class: 'abp-input',
Expand All@@ -47,6 +48,7 @@ export class AbpInputComponent implements OnInit, ControlValueAccessor {
id = input<string>('');
placeholder = input<string>('');
hint = input<string>('');
containerClass = input<string>('mb-3');
control: FormControl;
readonly formBuilder = inject(FormBuilder);
readonly changeDetectorRef = inject(ChangeDetectorRef);
Expand All@@ -71,7 +73,6 @@ export class AbpInputComponent implements OnInit, ControlValueAccessor {
}

writeValue(value: any[]): void {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

The writeValue method expects an array type (any[]) but the component appears to handle single values based on the template and form control setup. This should bewriteValue(value: any): void instead.

Suggested change
writeValue(value: any[]):void{
writeValue(value: any):void{

Copilot uses AI. Check for mistakes.
console.log(value);
this.value.setValue(value);
this.changeDetectorRef.markForCheck();
}
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp