silevis / reactgrid

Add spreadsheet-like behavior to your React app

Home Page:https://reactgrid.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Collapsible/expandable nonEditable chevronCell

monjunik opened this issue · comments

Describe the bug
ChevronCell cannot be collapsed/expanded when nonEditable prop is set to true.

Current behavior
When nonEditable prop is set to true the chevron cell content indeed cannot be edited, but also the expanding/collapsing does not work.

Expected behavior
When nonEditable prop is set to true the chevron cell content cannot be edited, but it can be expanded/collapsed.

There's an old related issue closed 3 years ago: #44 but the answer is not really satisfying. The functionality seems to be fundamental. Is there a way to overcome the issue?

That is an expected behavior. If you want to change it, you can. The templates for cell types are created to demonstrate a case of usage. If you want to create different cell template, so it will behave different (it will work the way as you want it to work). For this reason, i suggest to copy ChevronCell, and create something like MyChevronCell, which will work different way, so the way it will expand/collapse won't be related to nonEditable.

In v5, we will (most likely) abandon the current approach, and we won't create any CellTemplates by default, they may be an additional content, which will most likely be implemented just for demonstration purposes.

Once again: it's your job to create cells that behave the way you want them to behave.

Thank you for your time.