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

Feature Request: Keep header line on top when editing #200

Open
pjotre42 opened this issue Nov 6, 2020 · 2 comments
Open

Feature Request: Keep header line on top when editing #200

pjotre42 opened this issue Nov 6, 2020 · 2 comments

Comments

@pjotre42
Copy link

pjotre42 commented Nov 6, 2020

I have the following feature request:

As a user, I would like to edit rather long tables (i.e. many rows), with keeping an eye on the column titles, so I know which information to put in which column

Current situation: When scrolling down, the header row disappears. A mitigation is possible by adding a new row at the top, and then (After filling the information) dragging it down to the intended position. But this is cumbersome, especially on mobile devices.

Request: I would like to have the header row always displayed, even when scrolling down (either static setting, or as an option to be turned on when entering edit-mode)

Thanks!

@shankar2k
Copy link

There doesn't appear to be a user-configurable option for freezing the header row, but I was able to achieve this effect by editing the source code.

In lib/plugins/edittable/script/editor.js near line 142 there is the code for configuring the handsontable:

        var handsontable_config = {
            data: data,
            startRows: 5,
            startCols: 5,
            colHeaders: true,
            rowHeaders: true,
            manualColumnResize: true,
            manualRowResize: true,
            outsideClickDeselects: false,
            contextMenu: edittable.getEditTableContextMenu(getData, getMeta),
            manualColumnMove: true,
            manualRowMove: true,
            mergeCells: merges,

You can freeze the header row by adding to the configuration list fixedRowsTop: 1,, and similarly you can freeze the first column by adding fixedColumnsLeft: 1,. Then you have to refresh the plugin, by performing the touch command on conf/local.php.

@LeDistordu
Copy link

+1 :)

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

No branches or pull requests

3 participants