Skip to content

Commit 6fec661

Browse files
author
NarrowsProjects
committed
feat: add a width argument to textinputFIlter
1 parent f095cce commit 6fec661

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

lib/public/components/Filters/common/filters/textInputFilter.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ import { rawTextFilter } from './rawTextFilter.js';
1919
* @param {FilteringModel} filteringModel the page's filteringModel
2020
* @param {string} key the identifier to serve as css selector and to fetch the correct filter from the filteringModel
2121
* @param {string} placeholder placeholder text for the input element
22+
* @param {string} width class that determines the width of the input
2223
* @return {Component} the filter
2324
*/
24-
export const textInputFilter = (filteringModel, key, placeholder) =>
25-
rawTextFilter(filteringModel.get(key), { classes: ['w-100', `${key}-filter`], placeholder });
25+
export const textInputFilter = (filteringModel, key, placeholder, widthClass = 'w-100') =>
26+
rawTextFilter(filteringModel.get(key), { classes: [widthClass, `${key}-filter`], placeholder });

0 commit comments

Comments
 (0)