nick-keller / react-datasheet-grid

An Airtable-like / Excel-like component to create beautiful spreadsheets.
MIT License
1.81k stars 170 forks source link

Resize row height #314

Open Dennis-N8 opened 1 year ago

Dennis-N8 commented 1 year ago

Hi,

So I added support for multiple selection in Select column.

Now I have a few problems, one of them is how can I show all selected options in a cell?

Here in screenshot I have 4 options selected, but one of them is not visible.

image

hussamkhatib commented 1 year ago

You can use the rowHeight prop to figure out the height of the rows. https://react-datasheet-grid.netlify.app/docs/api-reference/props/#rowheight

You can't achieve your desired behavior though, all the rows will have the same height including the rows with less tags. The rowHeight prop does not accept a callback with rowData, instead just accepts a number which will be applied to all rows. You won't be able to overide with CSS classes, as the rowHeight prop value will be used instead, which gets applied by inline styles.

I think, the only way is to make changes in the source code to support this.