Skip to content

Drop down can't be seen when filtering only 1 column #24

@FrankSchiro

Description

@FrankSchiro

I have an issue where I can't see the dropdown menu if there is only 1 row because the table is too small.
This issue is fixed if I add css tags$style(".handsontable {overflow: visible !important; }"), however, this breaks the filter alignment.

To fix this, I had to set a minimum height to the table. In dq_render_handsontable, when the function is sending arguments to rhandsontable, I added these lines:

if(!is.null(app_input[[ns("pageSize")]])){    
            params[[1L]]$height = min(
                c(
                    50 * as.integer(app_input[[ns("pageSize")]]),
                    100 + 50 * nrow(dqv$full)
                )
            )
        }

This fixed the issue by setting a minimum height to the table. It would be easy to alter this to have a user defined height as one number in the min argument, or if the user defines minimum height just skip this code block.

I also tried setting min-height in the css of my ui, but that broke the dropdown option menu for some reason. Hope this helps someone.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions