From aa16bd36dccc5b4654a9f41960fb8c3490473410 Mon Sep 17 00:00:00 2001 From: "Ahmad K. Bawaneh" Date: Mon, 15 Jul 2024 15:26:56 +0300 Subject: [PATCH] fix #843 DominoUIConfig for different parts of the application --- .../header/DelayedHeaderFilterInput.java | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/DelayedHeaderFilterInput.java b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/DelayedHeaderFilterInput.java index a84d746b2..73d202712 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/DelayedHeaderFilterInput.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/datatable/plugins/filter/header/DelayedHeaderFilterInput.java @@ -22,6 +22,8 @@ import elemental2.dom.HTMLElement; import elemental2.dom.HTMLInputElement; +import org.dominokit.domino.ui.config.HasComponentConfig; +import org.dominokit.domino.ui.config.SearchConfig; import org.dominokit.domino.ui.datatable.ColumnConfig; import org.dominokit.domino.ui.datatable.model.Category; import org.dominokit.domino.ui.datatable.model.Filter; @@ -30,7 +32,6 @@ import org.dominokit.domino.ui.datatable.plugins.column.ColumnHeaderFilterPlugin; import org.dominokit.domino.ui.forms.InputFormField; import org.dominokit.domino.ui.utils.DelayedTextInput; -import org.dominokit.domino.ui.utils.DominoUIConfig; import org.dominokit.domino.ui.utils.HasPlaceHolder; /** @@ -44,9 +45,10 @@ */ public abstract class DelayedHeaderFilterInput< B extends InputFormField, T, V> - implements ColumnHeaderFilterPlugin.HeaderFilter { + implements ColumnHeaderFilterPlugin.HeaderFilter, HasComponentConfig { private B input; private DelayedTextInput delayedTextInput; + private SearchConfig config; /** Creates a new instance of DelayedHeaderFilterInput with a default placeholder. */ public DelayedHeaderFilterInput() { @@ -68,8 +70,16 @@ public DelayedHeaderFilterInput(String placeHolder) { delayedTextInput = DelayedTextInput.create( - getInputElement(), - DominoUIConfig.CONFIG.getUIConfig().getTableTextHeaderFilterSearchDelay()); + getInputElement(), getConfig().getTableTextHeaderFilterSearchDelay()); + } + + public void setOwnConfig(SearchConfig config) { + this.config = config; + } + + @Override + public SearchConfig getOwnConfig() { + return config; } /**