Skip to content

Commit

Permalink
fix #843 DominoUIConfig for different parts of the application
Browse files Browse the repository at this point in the history
  • Loading branch information
vegegoku committed Jul 15, 2024
1 parent f874529 commit aa16bd3
Showing 1 changed file with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;

/**
Expand All @@ -44,9 +45,10 @@
*/
public abstract class DelayedHeaderFilterInput<
B extends InputFormField<B, HTMLInputElement, V>, T, V>
implements ColumnHeaderFilterPlugin.HeaderFilter<T> {
implements ColumnHeaderFilterPlugin.HeaderFilter<T>, HasComponentConfig<SearchConfig> {
private B input;
private DelayedTextInput delayedTextInput;
private SearchConfig config;

/** Creates a new instance of DelayedHeaderFilterInput with a default placeholder. */
public DelayedHeaderFilterInput() {
Expand All @@ -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;
}

/**
Expand Down

0 comments on commit aa16bd3

Please sign in to comment.