Flexgrid - Overflow not working in cell

Posted by: jgallais on 5 October 2021, 8:27 am EST

    • Post Options:
    • Link

    Posted 5 October 2021, 8:27 am EST

    Hy,

    I’m trying to insert a custom component that look like à combobox.

    In this componant, there is a main input, and it displays a list (under the main input) when we enter somes caracters.

    The problem is that the overflow of the flexgrid component (set to hidden) hide the list (wich is in absolute position). What can i do to solve the problem ?

    An example to illustrate the problem :

    HTML :

    Open the list under the button
             <wj-flex-grid-column header="Downloads" [width]="170">
            <ng-template wjFlexGridCellTemplate [cellType]="'Cell'">
                <div class="container">
                    <button (click)="onContainerClick()">Open the list under the button</button>
                    <div class="list"
                    *ngIf="isOpen">
                    </div>
                </div>
            </ng-template>
        </wj-flex-grid-column>
    </wj-flex-grid>
    

    CSS :

    .container{

    position: relative;

    }

    .list{

    position: absolute;

    width: 50px;

    height: 50px;

    background-color: red;

    z-index: 1000;

    }

  • Posted 6 October 2021, 9:10 pm EST

    Hi,

    We are able to replicate the issue at our end and by setting the overflow to unset for the wj-cell, we are still able to replicate the issue and we are investigating for resolving this issue.

    Regards,

    Manish Gupta

  • Posted 11 October 2021, 2:49 am EST

    Hi,

    Thank you for your patience, we are able to find out two solutions for this.

    First by calculating and update the dropdown position:

    https://stackblitz.com/edit/github-j6ktuu-prjc7q?file=src%2Fapp%2Ftest-cmp.ts

    Another, using CSS only,

    https://stackblitz.com/edit/github-j6ktuu-t6nrc3?file=src%2Fapp%2Ftest-cmp.ts

    In our opinion, the first solution is the best for this case.

    Regards,

    Manish Gupta

  • Posted 12 October 2021, 2:31 am EST

    Hi,

    Thant’s for your answer.

    i look to the 2 solutions.

    The first one, is not working as expected. Ok to display the “red” list under the html element. But if i scroll my grid, the list don’t move.

    I tried to use MutationObserver to update the position, but it’s not working. There’s the solution to update in the ngAfterViewChecked, but it seem’s to be “heavy” .

    The second solution, seems to be dangerous. It was a solution that’s we have considered, but we are afraid of possible regressions.

    Any other solution ?

    It seems to be a regression, linked to a new version (in the 2 lasts years ^^) of wijmo, do you confirm that ?

    Thank’s.

    Regards,

    Jonathan.

  • Posted 13 October 2021, 7:28 am EST

    Hi Jonathan,

    We have updated the sample with the feature as the FlexGrid is scrolled, the dropdown will be closed.

    https://stackblitz.com/edit/github-j6ktuu-prjc7q?file=src%2Fapp%2Ftest-cmp.ts

    Hope it helps!

    Regards,

    Manish Gupta

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels