Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow wrapping cell text #134

Closed
TonyGermaneri opened this issue Jun 13, 2018 · 2 comments
Closed

Allow wrapping cell text #134

TonyGermaneri opened this issue Jun 13, 2018 · 2 comments
Assignees

Comments

@TonyGermaneri
Copy link
Owner

Also provide the properties:
Line height: (+/- font height)
Justification: left, right, center
review padding directives.

@ronbegley
Copy link

Mind if I ask how this is intended to work?

I'm doing this and it still acts like 'nowrap' is set

                  grid = canvasDatagrid({
                        parentNode: parentNode,
                        data: gridData,
                        style: {
                            cellWidth: 200,
                            cellWhiteSpace: 'normal'
                        }
                    });

@TonyGermaneri
Copy link
Owner Author

Looks like you have it set correctly. Data is clipped at the size of the cell, if the cell is tall enough for more than 1 row, it will draw multiple rows. Rows do not expand height to fit their content.

I think maybe you're expecting the rows to expand in height. I can add that feature, but right now it's not automatic, you'll need to set the height of the row manually. I used this as the default behavior for now because it is the behavior I observed in other grid programs. Another behavior I'd like to add is to allow overflow to overflow the cell without increasing row height if there is no data in the lower cells.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants