Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IconField: Does not work correctly if InputTextModule is not imported too #15798

Closed
aberonni opened this issue Jun 6, 2024 · 1 comment · Fixed by #15814
Closed

IconField: Does not work correctly if InputTextModule is not imported too #15798

aberonni opened this issue Jun 6, 2024 · 1 comment · Fixed by #15814
Labels
Component: Documentation Issue or pull request is related to Documentation Type: Bug Issue contains a bug related to a specific component. Something about the component is not working

Comments

@aberonni
Copy link
Contributor

aberonni commented Jun 6, 2024

Describe the bug

The IconField component does not render correctly if InputTextModule is not explicitly imported (although not explicitly used). I don't know if this is a documentation error, or a bug.

When following IconField documentation:

import { IconFieldModule } from 'primeng/iconfield';
import { InputIconModule } from 'primeng/inputicon';

@Component({
  ...
  imports: [
    IconFieldModule,
    InputIconModule,
  ],

I see this:

image

If I add the InputTextModule import, it works fine:

import { IconFieldModule } from 'primeng/iconfield';
import { InputIconModule } from 'primeng/inputicon';
+import { InputTextModule } from 'primeng/inputtext';

@Component({
  ...
  imports: [
    IconFieldModule,
    InputIconModule,
+   InputTextModule
  ],

image

Environment

N/A

Reproducer

No response

Angular version

17.3.0

PrimeNG version

17.18.0

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18.20.0

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

@aberonni aberonni added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jun 6, 2024
@SoyDiego
Copy link
Contributor

SoyDiego commented Jun 9, 2024

Describe the bug

The IconField component does not render correctly if InputTextModule is not explicitly imported (although not explicitly used). I don't know if this is a documentation error, or a bug.

When following IconField documentation:

import { IconFieldModule } from 'primeng/iconfield';
import { InputIconModule } from 'primeng/inputicon';

@Component({
  ...
  imports: [
    IconFieldModule,
    InputIconModule,
  ],

I see this:

image

If I add the InputTextModule import, it works fine:

import { IconFieldModule } from 'primeng/iconfield';
import { InputIconModule } from 'primeng/inputicon';
+import { InputTextModule } from 'primeng/inputtext';

@Component({
  ...
  imports: [
    IconFieldModule,
    InputIconModule,
+   InputTextModule
  ],

image

Environment

N/A

Reproducer

No response

Angular version

17.3.0

PrimeNG version

17.18.0

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18.20.0

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

Thanks for report it!
I have created a PR #15814 adding the import to documentation

@cetincakiroglu cetincakiroglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working Component: Documentation Issue or pull request is related to Documentation and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Documentation Issue or pull request is related to Documentation Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants