Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ dist
**/cypress/fixtures

.vscode
.idea
data.ms
.turbo

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/meilisearch/instant-meilisearch.git"
"url": "git@github.com:kirimgan/instant-meilisearch.git"
},
"workspaces": [
"packages/*",
Expand Down
6 changes: 3 additions & 3 deletions packages/instant-meilisearch/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@meilisearch/instant-meilisearch",
"version": "0.11.1",
"name": "@kirimgan/instant-meilisearch",
"version": "0.11.2",
"private": false,
"description": "The search client to use Meilisearch with InstantSearch.",
"homepage": "https://github.com/meilisearch/instant-meilisearch",
"homepage": "https://github.com/kirimgan/instant-meilisearch",
"license": "MIT",
"bugs": {
"url": "https://github.com/meilisearch/instant-meilisearch/issues"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export function MeiliParamsCreator(searchContext: SearchContext) {
},
addSort() {
if (sort?.length) {
meiliSearchParams.sort = [sort]
meiliSearchParams.sort = sort;
}
},
addGeoSearchRules() {
Expand Down
7 changes: 6 additions & 1 deletion packages/instant-meilisearch/src/contexts/search-context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,15 @@ export function createSearchContext(
instantSearchParams?.page
)

const sort = [];
for (let i = 0; i < sortByArray.length; i += 2) {
sort.push(sortByArray[i] + ':' + sortByArray[i + 1])
}

const searchContext: SearchContext = {
...options,
...instantSearchParams,
sort: sortByArray.join(':') || '',
sort: sort || '',
indexUid,
pagination: paginationState,
placeholderSearch: options.placeholderSearch !== false, // true by default
Expand Down
2 changes: 1 addition & 1 deletion packages/instant-meilisearch/src/package-version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const PACKAGE_VERSION = '0.11.1'
export const PACKAGE_VERSION = '0.11.2'
2 changes: 1 addition & 1 deletion packages/instant-meilisearch/src/types/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export type SearchContext = Omit<InstantSearchParams, 'insideBoundingBox'> &
keepZeroFacets: boolean
insideBoundingBox?: InsideBoundingBox
cropMarker?: string
sort?: string
sort?: string[]
primaryKey?: string
matchingStrategy?: MatchingStrategies
}
Expand Down
25,563 changes: 13,061 additions & 12,502 deletions yarn.lock

Large diffs are not rendered by default.