cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ThePowerAppsGuy
Resolver II
Resolver II

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 @ThePowerAppsGuy :

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.

@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 @ThePowerAppsGuy :

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

Hey @v-bofeng-msft,

 

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

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

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.

Top Solution Authors
Top Kudoed Authors
Users online (1,880)