简体   繁体   中英

how to change height DataTable PrimeReact

I can't stretch the table to the entire height of the block, even with one record
I am using PrimeReact in my app, here is my code:

            <DataTable
                value={dataArr}
                headerColumnGroup={headerGroup}
                paginator
                rows={1}
                rowsPerPageOptions={[10, 25, 50]}
                rowHover
                responsiveLayout="scroll"
                showGridlines
                stripedRows
                resizableColumns
                
            >
....
            </DataTable>

Because you are using responsiveLayout="scroll" you want to set scrollHeight="200px" or whatever height you want.

Example: https://codesandbox.io/s/boring-estrela-jvzoei?file=/src/demo/DataTablePaginatorDemo.js

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM