SearchPanes Background Colors in SelectList

SearchPanes Background Colors in SelectList

hkuestershkuesters Posts: 9Questions: 4Answers: 0

Hi!

I want to use background-color inside of my searchpanes - similiar to the background-colors in the table itself. You can see my example here https://p626900.mittwaldserver.info/fortbildungen

I tried the following code, but i doesn't work - the CSS-class will not be added to the <tr>. Everything else works very fine. Where is my mistake?

    columnDefs:[
        {
            searchPanes:{
                options:[
                    {
                        label: 'Quick-Fit-Seminare',
                        value: function(data, index) {
                            return data.Kategorie.includes('Quick-Fit-Seminare,');
                        },
                        class: 'cat01',
                    },
                    {
                        label: 'Innere Medizin',
                        value: function(data, index) {
                            return data.Kategorie.includes('Innere Medizin,');
                        },
                        class: 'cat02',
                    },

...

Thanks for your help!
Hubert

Answers

  • tangerinetangerine Posts: 3,342Questions: 35Answers: 394

    The docs for SearchPanes Options show className, not class.

  • hkuestershkuesters Posts: 9Questions: 4Answers: 0

    Hi tangerine!
    Thank for your answer!
    I modified my code. It's now:

        columnDefs:[
            {
                searchPanes:{
                    options:[
                        {
                            label: 'Quick-Fit-Seminare',
                            value: function(data, index) {
                                return data.Kategorie.includes('Quick-Fit-Seminare,');
                            },
                            className: 'cat01',
                        },
                        {
                            label: 'Innere Medizin',
                            value: function(data, index) {
                                return data.Kategorie.includes('Innere Medizin,');
                            },
                            className: 'cat02',
                        },
                        {
                            label: 'Psychische Erkrankungen',
                            value: function(data, index) {
                                return data.Kategorie.includes('Psychische Erkrankungen,');
                            },
                            className: 'cat03',
                        },
    

    ...

    But it still doesn't work.Any idea?

    Thanks and bye
    Hubert

Sign In or Register to comment.