web/elements: add separate flag for chips when checkboxes are enabled
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
d861a0cec9
commit
919946609d
|
@ -51,7 +51,7 @@ logconfig_dict = {
|
||||||
if SERVICE_HOST_ENV_NAME in os.environ:
|
if SERVICE_HOST_ENV_NAME in os.environ:
|
||||||
workers = 2
|
workers = 2
|
||||||
else:
|
else:
|
||||||
default_workers = max(cpu_count() * 0.25, 1) + 1 # Minimum of 2 workers
|
default_workers = max(cpu_count() * 0.25, 1) + 1 # Minimum of 2 workers
|
||||||
workers = int(os.environ.get("WORKERS", default_workers))
|
workers = int(os.environ.get("WORKERS", default_workers))
|
||||||
threads = 4
|
threads = 4
|
||||||
|
|
||||||
|
|
|
@ -117,6 +117,9 @@ export abstract class Table<T> extends LitElement {
|
||||||
@property({ type: Boolean })
|
@property({ type: Boolean })
|
||||||
checkbox = false;
|
checkbox = false;
|
||||||
|
|
||||||
|
@property({ type: Boolean })
|
||||||
|
checkboxChip = false;
|
||||||
|
|
||||||
@property({ attribute: false })
|
@property({ attribute: false })
|
||||||
selectedElements: T[] = [];
|
selectedElements: T[] = [];
|
||||||
|
|
||||||
|
@ -310,7 +313,7 @@ export abstract class Table<T> extends LitElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
renderTable(): TemplateResult {
|
renderTable(): TemplateResult {
|
||||||
return html` ${this.checkbox
|
return html` ${this.checkbox && this.checkboxChip
|
||||||
? html`<ak-chip-group>
|
? html`<ak-chip-group>
|
||||||
${this.selectedElements.map((el) => {
|
${this.selectedElements.map((el) => {
|
||||||
return html`<ak-chip>${this.renderSelectedChip(el)}</ak-chip>`;
|
return html`<ak-chip>${this.renderSelectedChip(el)}</ak-chip>`;
|
||||||
|
|
|
@ -13,6 +13,7 @@ import { first } from "../../utils";
|
||||||
@customElement("ak-group-member-select-table")
|
@customElement("ak-group-member-select-table")
|
||||||
export class MemberSelectTable extends TableModal<User> {
|
export class MemberSelectTable extends TableModal<User> {
|
||||||
checkbox = true;
|
checkbox = true;
|
||||||
|
checkboxChip = true;
|
||||||
|
|
||||||
searchEnabled(): boolean {
|
searchEnabled(): boolean {
|
||||||
return true;
|
return true;
|
||||||
|
|
Reference in New Issue