primeng icon indicating copy to clipboard operation
primeng copied to clipboard

Add global configuration (App wide)

Open darkcarnage opened this issue 6 years ago • 5 comments

I'm submitting a ...

[ ] bug report => Search github for a similar issue or PR before submitting
[x] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Is it possible to add a global configuration or app level defaults to Primeng components ? May be using dependency injection and something like this :

export class Table {
@Input() paginator: pTableConfig['paginator'];
@Input() lazy: pTableConfig['lazy'];
...

constructor(private config: pTableConfig) {
    this.paginator = config.paginator;
    this.lazy = config.lazy;
    ...
}

Use case: for example an app where pTable is configured the same way in dozens of components.

darkcarnage avatar Aug 11 '20 01:08 darkcarnage

Use forum for questions and help requests.

yigitfindikli avatar Aug 21 '20 12:08 yigitfindikli

Hi @yigitfindikli ,

I think it is a legitimate feature request and not a question. I even verified source code and didn't see any way to make a global configuration. If that's wrong could someone please point me to that information ?

darkcarnage avatar Aug 22 '20 02:08 darkcarnage

Hi,

Anyone there can verify this request again ?

Thanks.

Update: #6886 describes a similar issue with p-calendar but have no final answer yet.

darkcarnage avatar Aug 31 '20 23:08 darkcarnage

Hi,

Any update on this please ? We hope for a more relevant answer.

Thanks.

darkcarnage avatar Oct 31 '20 14:10 darkcarnage

It amazes me that this wasnt a valid feature request, in case where applications that have a big number of lets say table components, it would be sooo good to set it on one place for lets say each table to have 30 rows.

informatika-medved avatar May 11 '22 20:05 informatika-medved