- Notifications
You must be signed in to change notification settings - Fork3.6k
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
base:dev
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Pull Request Overview
This PR introduces a new AbpInputComponent as a secondary entry point for the ABP Angular components library, providing a reusable form input component with built-in validation display and localization support.
- Adds a new
AbpInputComponentthat implementsControlValueAccessorfor Angular reactive forms integration - Creates a secondary entry point
@abp/ng.components/abp-inputfor modular imports - Updates TypeScript configuration to support the new component structure
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| npm/ng-packs/tsconfig.base.json | Adds path mapping for the new abp-input secondary entry point |
| npm/ng-packs/packages/components/tsconfig.lib.json | Fixes exclude path for test-setup.ts |
| npm/ng-packs/packages/components/abp-input/src/public-api.ts | Exports the AbpInputComponent for public API |
| npm/ng-packs/packages/components/abp-input/src/lib/abp-input.component.ts | Main component implementation with form integration and validation |
| npm/ng-packs/packages/components/abp-input/src/lib/abp-input.component.html | Template with form controls, labels, and error display |
| npm/ng-packs/packages/components/abp-input/src/index.ts | Re-exports component from lib directory |
| npm/ng-packs/packages/components/abp-input/ng-package.json | Package configuration for Angular library build |
| npm/ng-packs/packages/components/abp-input/README.md | Documentation for the new secondary entry point |
Tip: Customize your code reviews with copilot-instructions.md.Create the file orlearn how to get started.
| }); | ||
| } | ||
| writeValue(value: any[]): void { |
CopilotAIOct 16, 2025
There was a problem hiding this comment.
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.
| writeValue(value: any[]):void{ | |
| writeValue(value: any):void{ |
| return [] | ||
| } | ||
| return [] |
CopilotAIOct 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
The errors getter always returns an empty array regardless of whether there are actual errors. It should return the actual error messages whenthis.control.errors exists.
| return[] | |
| } | |
| return[] | |
| returnObject.keys(this.control.errors); | |
| } | |
| return[]; |
| } | ||
| </div> | ||
| } | ||
| <div></div> |
CopilotAIOct 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Empty div element serves no purpose and should be removed to keep the template clean.
| <div></div> |
| abpInputFormGroup: FormGroup; | ||
| ngOnInit() { | ||
CopilotAIOct 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
[nitpick] Extra blank line after method declaration should be removed for consistency.
Uh oh!
There was an error while loading.Please reload this page.
Description
Resolves#23955
Includes