Home>

I would like to implement the following requirements in the grid layout, but do not know how to do it.

The number of items can be realized by the number of items as follows, but the arrangement order of items in the case of nine or more is lower from the top. Is there any way to solve it?

Private GetKeysStyle (Items: String) {
    IF (Items.Length >
= 9) {
        RETURN {
            MARGINTOP: '8px',
            DISPLAY: 'GRID',
            Gridgap: '6px',
            Gridautoflow: 'Column',
            GridTemplateColumns: 'repeat (Auto-fill, minmax (40px, 1fr))',
            GridTemplaateRows: 'repeat (4, 1fr)',
        };
    }
    RETURN {
        MARGINTOP: '8px',
        DISPLAY: 'GRID',
        Gridgap: '6px',
        GridTemplateColumns: 'repeat (2, 1fr)',
    }
}