From 382e8beaf90644c5b3e1ebd224e7fb6fe845bed4 Mon Sep 17 00:00:00 2001 From: Wlowscha <54003515+Wlowscha@users.noreply.github.com> Date: Mon, 24 Feb 2025 00:49:26 +0100 Subject: [PATCH] Method to get column at a given index in filter bar --- src/ui/filter-bar.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/ui/filter-bar.ts b/src/ui/filter-bar.ts index 6d9c1d9a421..374e1df44d4 100644 --- a/src/ui/filter-bar.ts +++ b/src/ui/filter-bar.ts @@ -86,6 +86,15 @@ export class FilterBar extends Phaser.GameObjects.Container { return this.dropDowns[this.columns.indexOf(col)]; } + /** + * Get the DropDownColumn associated to a given index + * @param index the index of the column to retrieve + * @returns the associated DropDownColumn if it exists, undefined otherwise + */ + getColumn(index: number) : DropDownColumn { + return this.columns[index]; + } + /** * Highlight the labels of the FilterBar if the filters are different from their default values */