RealGrid2 Guide
Tip 🆕
Filter Selector Style Tips 🆕

Filter Selector Style Customization Tips

You can customize the appearance of the filter selector using CSS.

For a detailed explanation, please refer to here (opens in a new tab) for more information.

/* Filter container */
.rg-filter-selector {
    font-size: 14px;
    color: #000;
    width: 170px;
    min-height: 150px;
    background: #ffffff;
    border: 1px solid #000;
    box-shadow: 1px 1px 4px 0 rgba(0, 0, 0, 0.3);
    padding: 12px;
    border-radius: 7px;
}
 
/* Filter search input container */
.rg-filter-searchbox {
    border: none;
    background: #f3f4f6;
    padding: 6px 10px !important;
    border-radius: 20px !important;
}
 
/* Filter search input */
.rg-filter-search-input {
    box-sizing: border-box;
    width: 100%;
    height: 24px;
    line-height: 24px;
    border: none;
    background: transparent;
    color: #656d7b;
}
 
/* Remove border when the filter search input is focused */
.rg-filter-search-input:focus {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}
 
/* Select-all area */
.rg-filter-select-all {
    cursor: pointer;
    font-size: 12px;
    padding: 10px 0px 5px 0px;
    border-bottom: 1px solid black;
}
 
/* Filter list container */
.rg-filter-list-viewport {
    border: none !important;
    padding-top: 7px;
}
 
.rg-filter-item {
    display: flex;
    align-items: center;
    font-size: 12px;
    background: #ffffff;
    height: 35px;
}
 
.rg-filter-item:hover {
    background: #f5f6fa;
    color: #000;
}
 
/* Selected filter item */
.rg-filter-item:has(.rg-filter-checkbox:checked) {
    background: #f5f6fa !important;
}
 
/* Checkbox base style */
.rg-filter-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    cursor: pointer;
    position: relative;
}
 
/* Custom checkbox image (unchecked) */
.rg-filter-checkbox::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 16px;
    height: 16px;
    background-image: url("/images/checkImages/unchecked.png");
    background-size: 100% 100% !important;
    background-repeat: no-repeat;
}
 
/* Custom checkbox image (checked) */
.rg-filter-checkbox:checked::before {
    width: 16px;
    height: 16px;
    background-image: url("/images/checkImages/checked.png");
    background-size: 100% 100% !important;
    background-repeat: no-repeat;
}
 
/* Custom checkbox image (indeterminate) */
.rg-filter-checkbox:indeterminate::before {
    width: 16px;
    height: 16px;
    background-size: 100% 100% !important;
    background-repeat: no-repeat;
    background-image: url("/images/checkImages/indeterminate.png");
}
 
.rg-filter-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
 
/* Reset text */
.rg-filter-select-all .rg-filter-column-reset {
    right: 5px;
    padding: 0px;
    color: #fe9201;
    text-decoration: underline;
    font-weight: bold;
}
 
/* Button container */
.rg-filter-button {
    color: #000;
    text-align: right;
    padding: 10px 2px 0px 2px;
}
 
/* Apply button */
.rg-filter-accept {
    cursor: pointer;
    border: 1px solid #c4c4c4;
    border-radius: 5px;
    padding: 8px 18px !important;
    color: #000;
    background: #fff;
}
 
.rg-filter-accept:hover {
    color: #fff;
    background: #fe9201;
    border: 1px solid #fe9201;
}
 
/* Cancel button */
.rg-filter-cancel {
    background: #adacab;
    border: 1px solid #adacab;
    border-radius: 5px;
    padding: 8px 18px !important;
    color: #fff;
    cursor: pointer;
    margin-left: 2px;
}