web/user: fix search not updating app (#7825)
web/user: fix app not updating so when using two classes in a classMap directive, the update fails (basically saying that each class must be separated), however this error only shows when directly calling requestUpdate and is swallowed somewhere when relying on the default render cycle Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
parent
23d3d6ddc4
commit
fef1090a4e
|
@ -96,7 +96,7 @@ export class LibraryApplication extends AKElement {
|
||||||
this.application.metaPublisher !== "" ||
|
this.application.metaPublisher !== "" ||
|
||||||
this.application.metaDescription !== "";
|
this.application.metaDescription !== "";
|
||||||
|
|
||||||
const classes = { "pf-m-selectable pf-m-selected": this.selected };
|
const classes = { "pf-m-selectable": this.selected, "pf-m-selected": this.selected };
|
||||||
const styles = this.background ? { background: this.background } : {};
|
const styles = this.background ? { background: this.background } : {};
|
||||||
|
|
||||||
return html` <div
|
return html` <div
|
||||||
|
|
|
@ -38,7 +38,9 @@ export class LibraryPageApplicationList extends AKElement {
|
||||||
];
|
];
|
||||||
|
|
||||||
@property({ attribute: false })
|
@property({ attribute: false })
|
||||||
apps: Application[] = [];
|
set apps(value: Application[]) {
|
||||||
|
this.fuse.setCollection(value);
|
||||||
|
}
|
||||||
|
|
||||||
@property()
|
@property()
|
||||||
query = getURLParam<string | undefined>("search", undefined);
|
query = getURLParam<string | undefined>("search", undefined);
|
||||||
|
@ -63,7 +65,7 @@ export class LibraryPageApplicationList extends AKElement {
|
||||||
shouldSort: true,
|
shouldSort: true,
|
||||||
ignoreFieldNorm: true,
|
ignoreFieldNorm: true,
|
||||||
useExtendedSearch: true,
|
useExtendedSearch: true,
|
||||||
threshold: 0.5,
|
threshold: 0.3,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,7 +79,6 @@ export class LibraryPageApplicationList extends AKElement {
|
||||||
|
|
||||||
connectedCallback() {
|
connectedCallback() {
|
||||||
super.connectedCallback();
|
super.connectedCallback();
|
||||||
this.fuse.setCollection(this.apps);
|
|
||||||
if (!this.query) {
|
if (!this.query) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue