Typo fixes and minor change.

This commit is contained in:
CentreMetre
2026-06-14 20:55:04 +01:00
parent 0eb45263a4
commit 73f80d874b

View File

@@ -139,7 +139,7 @@ export abstract class Table<TRow extends object> {
/** /**
* Creates a row, populated with data, for displaying in the table. * Creates a row, populated with data, for displaying in the table.
* @param data The data in the shape of `R`, with values populated. * @param data The data in the shape of `TRow`, with values populated.
* @return A HTMLTableRowElement that can then be set on a table. * @return A HTMLTableRowElement that can then be set on a table.
*/ */
createPopulatedRow(data: TRow): HTMLTableRowElement { createPopulatedRow(data: TRow): HTMLTableRowElement {
@@ -199,6 +199,7 @@ export abstract class Table<TRow extends object> {
this.clearRows() this.clearRows()
if (data.length === 0) { if (data.length === 0) {
this.setMessage("No data to show. Empty list provided.") this.setMessage("No data to show. Empty list provided.")
return
} }
this.appendRows(data) this.appendRows(data)
} }
@@ -220,7 +221,7 @@ export abstract class Table<TRow extends object> {
} }
/** /**
* Appends a message to the alread existing table message, if the message element is set. Works even if current message is empty (""). * Appends a message to the already existing table message, if the message element is set. Works even if current message is empty ("").
* @param message The message to append to the current message. * @param message The message to append to the current message.
*/ */
appendMessage(message: string) { appendMessage(message: string) {
@@ -229,7 +230,7 @@ export abstract class Table<TRow extends object> {
} }
/** /**
* Sets the message, overwriting what it was before. Id the message element is not set, it does nothing. * Sets the message, overwriting what it was before. If the message element is not set, it does nothing.
* @param message The message to set the message element to. * @param message The message to set the message element to.
*/ */
setMessage(message: string) { setMessage(message: string) {