Take remaining space /(height) for symbolpalette and diagram

hi,

is there a way to set the height of a symbolpalette and/or the diagram

to the remaining space instead of fixed px?


Best Regards

Tobias


3 Replies

SG Shyam G Syncfusion Team January 10, 2022 10:01 AM UTC

Hi Tobias,


Yes, you should define a symbol palette height value in percentage, so that the symbol palette is updated based on the palette item that you add initially or dynamically. Please refer to a code example and the sample for your reference.


Code example:

<SymbolPaletteComponent

                id="symbolpalette"

                ref={(symbolpal) => (palette = symbolpal)}  

                height={'100%'}

              />



Sample: https://stackblitz.com/edit/react-jht376


Regards,

Shyam G



TK Tobias Koller January 10, 2022 11:24 AM UTC

hi Shyam,

thanks for your answer.


but

  1. I want the palette to be 100% of remaining space and then have some scrollbars if content is longer
  2. your example doesn't work. No matter what I add there as height 10%, 20% ... it always gets as large as the complete content of the palette.
Best Regards
Tobias


SG Shyam G Syncfusion Team January 11, 2022 08:41 AM UTC

Hi Tobias,


By default, the value for symbol palette width and height should be defined either in pixel(example: 200px) or percentage(example: 100%). If an palette should be rendered within particular height, you should set the symbol palette height in pixel. If you set a symbol palette height in percentage, then the palette will be rendered without scrollbars. So, please set symbol palette height in pixel to achieve your requirement. Please refer to a sample below in which we have rendered the palette height in pixel.


Sample: https://stackblitz.com/edit/react-jht376


Regards,

Shyam G


Loader.
Up arrow icon