reactivesearch icon indicating copy to clipboard operation
reactivesearch copied to clipboard

initReactivesearch with url params example

Open abathellier opened this issue 8 years ago • 2 comments

Issue Type: Enhancement

Platform: Web

Description: Add url params example for SSR guide

In what format should we use url params in initReactivesearch?

		return {
			store: await initReactivesearch(
				[
					{
						...dataSearchProps,
						type: 'DataSearch',
						source: DataSearch,
					},
					{
						...reactiveListProps,
						type: 'ReactiveList',
						source: ReactiveList,
					},
				],
				null, // What instead of null?
				settings,
			),
		};

Reactivesearch version: ^2.6.7

abathellier avatar Jul 06 '18 14:07 abathellier

Well, I have this and it works right out of the box:

const categorySearchProps = {
	dataField: ["name", "description"],
	categoryField: 'category.raw',
	componentId: 'searchbox',
	defaultSelected: 'Phone',
    className: 'form-control',
    id: 'search-field',
    showIcon: false,
    URLParams: true,
};

coommark avatar Jul 16 '18 13:07 coommark

It works out of the box since the v2.6.8 update.

abathellier avatar Jul 18 '18 14:07 abathellier