mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-12 08:58:25 +01:00
Et2LinkString / Et2LinkList: Use maxmatchs preference as default limit
You can still override this with limit attribute
This commit is contained in:
parent
bbd4a79452
commit
c89f0578d4
@ -115,7 +115,7 @@ export class Et2LinkString extends Et2Widget(LitElement) implements et2_IDetache
|
|||||||
* If number is exceeded, a "Load more links ..." button is displayed, which will load the double amount of links each time clicked
|
* If number is exceeded, a "Load more links ..." button is displayed, which will load the double amount of links each time clicked
|
||||||
*/
|
*/
|
||||||
@property({type: Number})
|
@property({type: Number})
|
||||||
limit = 20;
|
limit = 0;
|
||||||
|
|
||||||
protected _totalResults : number = 0;
|
protected _totalResults : number = 0;
|
||||||
protected _link_list : LinkInfo[] = [];
|
protected _link_list : LinkInfo[] = [];
|
||||||
@ -125,6 +125,17 @@ export class Et2LinkString extends Et2Widget(LitElement) implements et2_IDetache
|
|||||||
constructor()
|
constructor()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
|
if(this.limit == 0)
|
||||||
|
{
|
||||||
|
this.egw().preference("maxmatchs", "common", true).then((pref) =>
|
||||||
|
{
|
||||||
|
// If limit was set via attribute, it will no longer be 0
|
||||||
|
if(this.limit == 0)
|
||||||
|
{
|
||||||
|
this.limit = parseInt(pref ?? 20);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async getUpdateComplete()
|
async getUpdateComplete()
|
||||||
|
Loading…
Reference in New Issue
Block a user