web: switch to eslint
This commit is contained in:
		| @ -12,7 +12,7 @@ export abstract class Table<T> extends LitElement { | ||||
|     data?: PBResponse<T>; | ||||
|  | ||||
|     @property() | ||||
|     page: number = 1; | ||||
|     page = 1; | ||||
|  | ||||
|     static get styles() { | ||||
|         return [COMMON_STYLES]; | ||||
| @ -51,12 +51,12 @@ export abstract class Table<T> extends LitElement { | ||||
|             return; | ||||
|         } | ||||
|         return this.data.results.map((item) => { | ||||
|             const fullRow = [`<tr role="row">`].concat( | ||||
|             const fullRow = ["<tr role=\"row\">"].concat( | ||||
|                 this.row(item).map((col) => { | ||||
|                     return `<td role="cell">${col}</td>`; | ||||
|                 }) | ||||
|             ); | ||||
|             fullRow.push(`</tr>`); | ||||
|             fullRow.push("</tr>"); | ||||
|             return html(<any>fullRow); | ||||
|         }); | ||||
|     } | ||||
| @ -71,8 +71,8 @@ export abstract class Table<T> extends LitElement { | ||||
|                         <slot name="create-button"></slot> | ||||
|                         <button | ||||
|                             @click=${() => { | ||||
|                                 this.fetch(); | ||||
|                             }} | ||||
|         this.fetch(); | ||||
|     }} | ||||
|                             class="pf-c-button pf-m-primary" | ||||
|                         > | ||||
|                             Refresh | ||||
| @ -88,8 +88,8 @@ export abstract class Table<T> extends LitElement { | ||||
|                 <thead> | ||||
|                     <tr role="row"> | ||||
|                         ${this.columns().map( | ||||
|                             (col) => html`<th role="columnheader" scope="col">${col}</th>` | ||||
|                         )} | ||||
|         (col) => html`<th role="columnheader" scope="col">${col}</th>` | ||||
|     )} | ||||
|                     </tr> | ||||
|                 </thead> | ||||
|                 <tbody role="rowgroup"> | ||||
|  | ||||
| @ -13,7 +13,7 @@ export class TablePagination extends LitElement { | ||||
|  | ||||
|     previousHandler() { | ||||
|         if (!this.table?.data?.pagination.previous) { | ||||
|             console.debug(`passbook/tables: no previous`); | ||||
|             console.debug("passbook/tables: no previous"); | ||||
|             return; | ||||
|         } | ||||
|         this.table.page = this.table?.data?.pagination.previous; | ||||
| @ -21,7 +21,7 @@ export class TablePagination extends LitElement { | ||||
|  | ||||
|     nextHandler() { | ||||
|         if (!this.table?.data?.pagination.next) { | ||||
|             console.debug(`passbook/tables: no next`); | ||||
|             console.debug("passbook/tables: no next"); | ||||
|             return; | ||||
|         } | ||||
|         this.table.page = this.table?.data?.pagination.next; | ||||
| @ -44,8 +44,8 @@ export class TablePagination extends LitElement { | ||||
|                         <button | ||||
|                             class="pf-c-button pf-m-plain" | ||||
|                             @click=${() => { | ||||
|                                 this.previousHandler(); | ||||
|                             }} | ||||
|         this.previousHandler(); | ||||
|     }} | ||||
|                             disabled="${this.table?.data?.pagination.previous ? "true" : "false"}" | ||||
|                             aria-label="{% trans 'Go to previous page' %}" | ||||
|                         > | ||||
| @ -56,8 +56,8 @@ export class TablePagination extends LitElement { | ||||
|                         <button | ||||
|                             class="pf-c-button pf-m-plain" | ||||
|                             @click=${() => { | ||||
|                                 this.nextHandler(); | ||||
|                             }} | ||||
|         this.nextHandler(); | ||||
|     }} | ||||
|                             disabled="${this.table?.data?.pagination.next ? "true" : "false"}" | ||||
|                             aria-label="{% trans 'Go to next page' %}" | ||||
|                         > | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Jens Langhammer
					Jens Langhammer