Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for enabling results grouping for newly added results webpart #3809

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

patrikhellgren
Copy link
Contributor

Fixes an issue that would occur when enabling results grouping in the details list layout for a newly added results webpart. After adding a results webpart and switching to details list layout the grouping toggle was did not change state until you first exited webpart properties and then edited it again.

@wobba
Copy link
Collaborator

wobba commented Jun 19, 2024

@patrikhellgren I think some improvement can be made here as your change will always load the grouping part - regardless of being used or not. I think you can maybe move the code to getPropertyPaneFieldsConfiguration, or check if we're in edit or display mode?

@wobba
Copy link
Collaborator

wobba commented Jun 30, 2024

@patrikhellgren any opinions on the lazy loading?

@patrikhellgren
Copy link
Contributor Author

@wobba Sorry, had missed your earlier comment. I will have a look later today. If I remember correctly there is no way of passing the webpart display mode to the layout and there were existing lazy loadings without conditions so that's why it was done that way. I could add the display mode to the layout interface to have a good way of checking that in the layout. Any thoughts on that?

@patrikhellgren
Copy link
Contributor Author

@wobba I have now checked the code and I remembered correctly, there was already another lazy loading in place without any condition. I agree that it would be optimal if the lazy loading only happened if the webpart was in edit mode. I think the best option would be to add an editMode property to BaseLayout just like BaseDataSource already has and then pass this from the webpart. What is your opinion?

@wobba
Copy link
Collaborator

wobba commented Jul 7, 2024

@patrikhellgren I trust your judgement on passing the value :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants