Nested listviews highlight row

0
Hi, I have two nested list views, in inner view i have a table to display, how can i force to only highlight one row of the inner view, that is if i select one row only that row is hightlighted, right now looks like each outer view (toplevel) has its row highlighted. Thanks Shannon
asked
3 answers
1

the class "listview-stylingless" has styling to remove the selected and hover state. You can create a cusom class to apply to your outer listviews that removes the selected and hover state. Or you can just add the "listview-stylingless" class to your outer list views if you arent worried about losing the styling. 

Try adding something along the lines of this to your custom.scss file. 

.listview-noselection.mx-listview {
    .mx-listview-item {


        &:hover {
            background-color: transparent;
        }
        &.selected {
            background-color: transparent !important;
            &:hover {
                background-color: transparent !important;
            }
        }
    }
}

 

 

Heres some documentation on setting up koala and editing the sass files in the theme directory.

https://docs.mendix.com/howto/ux/setup-mendix-ui-framework-with-koala

answered
1

You can make two classes with the same code but make the hover and selected transparent.

.noselection{
    .mx-listview {
        .mx-listview-item {
             &:hover {
                 background-color: transparent;
             }
            &.selected {
                background-color: none !important;
            }
            &:hover {
                background-color: none !important;
            }
        }
    }
}

.selected{
    .mx-listview {
        .mx-listview-item {
             &:hover {
                 background-color: #ddd;
             }
            &.selected {
                background-color: #ddd;
            }
            &:hover {
                background-color: #ddd;
            }
        }
    }
}

listview-stylingless is an excellent class but be careful because it removes not padding as well.

answered
0

Thanks, i will take a look, this removes all the styling? i want to keep one row highlighted.

answered