how to control the position of the popup filter menu

1 Answer 157 Views
Filter  General Discussions Grid Popup Styling
Daniel
Top achievements
Rank 1
Iron
Iron
Daniel asked on 04 Jan 2022, 02:19 PM

Hi I wonder if it is possible and how to control the position of the popup filter menu I want something like this for all the columns 

for every column menu filter the pop up will open to the left starting from the filter icon position

1 Answer, 1 is accepted

Sort by
0
Accepted
Stefan
Telerik team
answered on 05 Jan 2022, 05:49 AM

Hello,

We can use the PopupContext for that. That allows customizing all Popups inside of it:

https://www.telerik.com/kendo-react-ui/components/popup/global-context/

We can use that to change the position of all Popup components in the Grid:

https://www.telerik.com/kendo-react-ui/components/popup/aligning-positioning/#toc-positioning

Still, please remember that this will change all of them, not only for the column menu.

Currently, this option allows changing all component instances, not only specific ones.

Regards,
Stefan
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer, and each of you can get a $50 Amazon gift voucher.

Daniel
Top achievements
Rank 1
Iron
Iron
commented on 05 Jan 2022, 07:30 AM

Hi, thanks,

can I ask you to provide an example of using it for GridColumnMenuFilter?

Stefan
Telerik team
commented on 05 Jan 2022, 08:51 AM

I made an example showcasing a possible approach:

https://stackblitz.com/edit/react-tpxhkb?file=app/main.jsx

The PopupContext gives access to all of the options, so you can further modify them.

Daniel
Top achievements
Rank 1
Iron
Iron
commented on 05 Jan 2022, 09:16 AM

Thank you for that but I'm trying to make it open like the image I attached but none of the options do it, is possible to make it open that way?

Stefan
Telerik team
commented on 05 Jan 2022, 09:40 AM

All of the available positions are shown in the documentation.

Yes, none of them is 100% the same as the picture, but they can move it on the left:

https://stackblitz.com/edit/react-tpxhkb-k5euab?file=app/main.jsx
Daniel
Top achievements
Rank 1
Iron
Iron
commented on 05 Jan 2022, 09:59 AM | edited

Greate Thanks! 

the last question please if I have many Grids that I want to do for them I need to wrap each of them with PopipPropsContext.Provider or there is a better way to do it globally?

** edit - I see that it does the same for the select dropdown inside the filter menu and it's bad for me how can I do it only for the filter menu popup?

 

Stefan
Telerik team
commented on 05 Jan 2022, 10:08 AM

If this is needed for multiple Grid, this can be made to a HOC component that is wrapped and then use Grid in all places.

As for the DropDowns, as mentioned in the first replay, this will change it for all Popups, at this point we can either change all of them or none of them.
Daniel
Top achievements
Rank 1
Iron
Iron
commented on 05 Jan 2022, 10:15 AM

Thanks for your time appreciate it.
Tags
Filter  General Discussions Grid Popup Styling
Asked by
Daniel
Top achievements
Rank 1
Iron
Iron
Answers by
Stefan
Telerik team
Share this question
or