Filter popup size

Hi,


How can we control the size of the filter popup in the pivot table. We find it a bit small.




3 Replies

SP Sastha Prathap Selvamoorthy Syncfusion Team May 12, 2022 10:43 AM UTC

Hi Thierry,


You can customize the filter popup size using CSS property. Please refer to the code example below.


Code sample:

<style>

    // here you can modify the width and height of the filter popup

    #PivotView .e-member-editor-dialog {

        height400px !important;

        max-height400px !important;

        width350px !important;

    }

 

    // here you can modify the height of the treeview element in filter popup

    #PivotView .e-member-editor-container-outer-div {

        height:205 important;

    }

</style>


Meanwhile, we have prepared a sample for your reference below.

Sample: https://stackblitz.com/edit/lmfggj?file=index.html,index.ts


Please let us know if any concern occurs.


Regards,

Sastha Prathap S.



TT Thierry Tremblay May 12, 2022 02:05 PM UTC

Thanks you, but is there a way to do this dynamically via Javascript?


We might want to have different sizes for different screen resolutions.



AP AngelinFaithSheeba PaulvannanRajadurai Syncfusion Team May 13, 2022 02:24 PM UTC

Hi Thierry,


Please refer the below code example to meet your requirements through JavaScript.


Code Example:


index.ts

memberEditorOpen: function () {

    // here you can modify the members editor dialog size based upon the display resolution.

    if (document.getElementById('PivotView').offsetWidth > 960) {

      if (document.getElementById('PivotView_EditorTreeView')) {

        document

          .getElementById('PivotView_EditorTreeView')

          .classList.remove('e-member-editor-dialog');

        document

          .getElementById('PivotView_EditorTreeView')

          .classList.add('e-member-editor-resize');

      }

    } else {

      if (document.getElementById('PivotView_EditorTreeView')) {

        document

          .getElementById('PivotView_EditorTreeView')

          .classList.remove('e-member-editor-resize');

        document

          .getElementById('PivotView_EditorTreeView')

          .classList.add('e-member-editor-dialog');

      }

    }

  }


index.html

.e-member-editor-resize{

        max-height700px !important;

        border-radius6px;

        max-width600px !important;

        width500px !important;

        height700px !important;

  }


Meanwhile, we have prepared a sample for your reference.


Sample: https://stackblitz.com/edit/nupvah-vnetvs?file=index.js,index.html


Please let us know if you have any concerns.


Regards,

Angelin Faith Sheeba.


Loader.
Up arrow icon