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

Search Box for SP2019 #12

Closed
DeveshRV opened this issue Jul 20, 2021 · 13 comments
Closed

Search Box for SP2019 #12

DeveshRV opened this issue Jul 20, 2021 · 13 comments

Comments

@DeveshRV
Copy link

Hi There, many thanks for this solution.

I am not sure how can we make use for Search box and other web parts for SP2019. Can you help on this

@DeveshRV
Copy link
Author

Hello,

The search box and other webparts of original solution do not work with SharePoint 2019. Can you please integrate/ share links for the other webparts for SP2019. Many Thanks in advance

@Matej4386
Copy link
Owner

The solution is available here: https://github.com/Matej4386/SP2019-search/releases/tag/2.0.0.6

@ManuSquall
Copy link

Hello @Matej4386, thanks a lot for the initiative and this webpart!
I'm facing some issues when i try to deploy it, instead of taking the sppkg that i can't deploy, i tried to package your solution with the "skipFeatureDeployment" parameter set to "true".
Once deployed i only see one webpart without the posibility to choose a data source list or site:

image

And the search box is also missing if i don't check "Use a default search query" option with a default value:

image

Thanks in advance for anyone who can help me on those points or share some links.

@Matej4386
Copy link
Owner

Hello,
sorry for late answer. What are the problems with package deployment?
Yes there is only one webpart (search box and search results are in 1 webpart because with spfx 1.4. we cant have 2 webparts communicating with each other).

Could you please post webpart settings?

@ManuSquall
Copy link

Hi @Matej4386, hope you're doing well.

Thanks for the explanations, really helpfull.

Unfortunally, due to a local restriction situation, i can only deploy a webpart by enable "skipFeatureDeployment" property to true. I have tested your webpart by download it, add some change, bundle and package it again.

Webpart screeshoots coming ahead:

@Matej4386
Copy link
Owner

Matej4386 commented Dec 1, 2021

Hi @ManuSquall skipFeatureDeployment property should not have any impact. Waiting for screenshots ;-)

@ManuSquall
Copy link

Webpart screenshots:
image

Display of the webpart:
image

Set " " (spacebar) for query keyword to display searchbar and results appear on the display:
image

image

image

image

image

image

image

Beside all, is there a way to display the search bar without setting any query keywords?

Is it possible to add custom filter from a list basic column?

Do you also have so good links (or advice) on how to integrate search with KQL queries like what you have done ? :-)
Thank you for your time!

@Matej4386
Copy link
Owner

Hello, OK I have just tested it (fresh webaprt added to site). Yes at first there is no SearchBox (I think because of some props dont update well at start), I dont think you need to set up any query keywords, just go to the Search bar setting in properties pane and turn it of and on again.

@Matej4386
Copy link
Owner

image
image
image
image
image

@Matej4386
Copy link
Owner

image

@ManuSquall
Copy link

Hello, OK I have just tested it (fresh webaprt added to site). Yes at first there is no SearchBox (I think because of some props dont update well at start), I dont think you need to set up any query keywords, just go to the Search bar setting in properties pane and turn it of and on again.

Have done it and it still not displaying. By the way it seems like your webpart settings display differ from mine. Is it possible to get his source code please? I'm actually using the webpart cod eof your master branch

@Matej4386
Copy link
Owner

Och sorry, I wasnt looking at this new version :-( my bad, I had two workbenchs running and old installed version on search in workbench. I modified code.

Small fix in src\webparts\nbsSearch\NbsSearchWebPart.ts:

if (isValueConnected && !this.properties.useDefaultSearchQuery ||
isValueConnected && this.properties.useDefaultSearchQuery && this.properties.defaultSearchQuery ||
!isValueConnected && !isEmpty(queryKeywords) ||
this.properties.useSearchBox
) {
renderElement = this._searchContainer;

@ManuSquall
Copy link

Thank you @Matej4386 🥳🥳

image

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

No branches or pull requests

3 participants