Resize dropdown filter menu

Tags: #<Tag:0x00007fc46495c9e8>

Hi,

I want to resize the dropdown filter menu in handsontable and came across this post: Filters filter_by_value dropdown menu size modification
I managed adjusting the width following this example: http://jsfiddle.net/handsoncode/zxguhohs/
Are there any updates on how to adjust the height as well?

Thanks a lot.

Hi @stephan.boehme

Sorry, but there are no settings for the height. It is counted automatically based on the number of elements in the menu.
What exactly you would like to do with the height? Make it smaller to show a scroll or widen some options?

Hi,

I want to make it larger. In a table with many different entries in a column, it shows only the top 4 entries and the scrollbar. In a perfect world, the user could simply resize the menu, but since this is not possible, I would at least increase the height.

Besidese that, here is my code for the width (using Angular and Typescript) inside an init method. Maybe someone can use it as reference:

const thisHot: Handsontable = this.hot;
Handsontable.hooks.add('modifyColWidth', function(width) {
  const x: any = thisHot.getPlugin('dropdownMenu').menu;
  if (this === x.hotMenu) {
    return 400;
  }
  return width;
});

Maybe something like this http://jsfiddle.net/6ng8cxmf/1/ ?

But that’s only a CSS hack.

A CSS hack is better than nothing :wink:
I had to add ::ng-deep in front of it, and now it’s working fine.
Thanks a lot!

1 Like