Premium support for our pure JavaScript UI components


Post by H9FFDC »

Hi,

We would like to be able to add an attribute to the filter HTML input fields on the grid, is it possible to do this through the grid config when generating it or would that require us to fiddle with the elements after they've been generated?

Couldn't find anything specifically for the filters regarding this in documentation, the Field class has the inputAttributes property but couldn't find a way of providing it.

Thanks.


Post by pmiklashevich »

Hello,

Are you talking about input fields in the column header created by FilterBar feature? Like in our filterbar demo?

You can set "filterField" to filterable config of the column you want. There you can pass the config of the field which represents the filter input. All fields support inputAttributes config.

columns : [
         {
             field : 'name',
             // Filtering for a value out of a list of values
             filterable: {
                 filterField : {
                     inputAttributes : {
                         foo : 'bar'
                     }

Pavlo Miklashevych
Sr. Frontend Developer


Post by H9FFDC »

Hello Pavel,

I was indeed talking about that and that is exactly what I needed, thanks for your help.

Sorry I hadn't noticed it in the documentation.

Thanks again.


Post Reply