cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

How to unfocus selected record in gallery?

Hey everybody,

Just go a little question and it should be quite easy to answer.

 

If I click a record in the gallery, then it'll be focused.

But how to disable the focus of the record again if I click on the record of the gallery?

 

Thanks so much for helping!

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Anonymous :

Only need to set two variables to achieve this function.I've made a test for your reference:

1\Set the Gallery's OnSelect property to :

 

Set(var,!var);Set(default,ThisItem);Reset(Gallery1) /*var and default is my variables*/

 

2\Set the Gallery's Default property to :

 

If(var,{},default)

 

37.gif

Best Regards,

Bof

View solution in original post

4 REPLIES 4
eka24
Super User III
Super User III

Can you show a screenshot

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Anonymous
Not applicable

@eka24,

 

If I don't want a default item selected on the gallery, I can set the default property to {}.

Then the gallery has no focus by default. But if I click the gallery again, then it'll focus again. That's what I like.

 

But what I'd like to achieve is, if I click again, then the item should not be selected again (no focus).

I've tried following for the Gallery:

OnSelect              {}

OnSelect              SetFocus(Label)

 

But there's no chance to disable the selection for the Gallery.

 

Does anyone know how to achieve it?

 

Thanks so much for helping!

Hi @Anonymous :

Only need to set two variables to achieve this function.I've made a test for your reference:

1\Set the Gallery's OnSelect property to :

 

Set(var,!var);Set(default,ThisItem);Reset(Gallery1) /*var and default is my variables*/

 

2\Set the Gallery's Default property to :

 

If(var,{},default)

 

37.gif

Best Regards,

Bof

View solution in original post

Anonymous
Not applicable

Hey @v-bofeng-msft,

 

Thanks for your help 😀. It's working...

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,966)