Overriding primeNG inputtext

UI Components for Angular
Post Reply
codeliftsleep
Posts: 5
Joined: 01 Oct 2019, 16:19

31 Oct 2019, 17:11

Running into an issue trying to override primeNG inputtext.

We have an editable property set on it which determines whether it should be shown as a normal input or if it should be set to just text. Since there is no HTML to put an *ngIf in, we are trying to use renderer2 to make it work. However, this doesn't work properly because this is ran before the component is initialized where the editable property is set to false. In addition, on this particular component, the input values are set via an object initially in the init since it takes values from another component. Since these values are blank until they are set, the inputtext component sets blank values.

It ends up working if you go there once(where it doesn't work), leave and then go back again since these values have all been set already and the editable property is already set to false. However, I see no way of getting this working as is on initial load because the inputtext component is initializing before anything else.

Any tips on how to get something like this working using HTML?

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 17 guests