Skip to content

Commit b9a5a4b

Browse files
add (vue): support vectorDataField and candidates props for search / result components
1 parent bc8a46b commit b9a5a4b

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

packages/vue/src/components/result/ReactiveList.d.ts

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import * as types from '../../types.ts';
55
interface ReactiveListProps extends CommonProps {
66
children?: (data: any) => any;
77
dataField: string;
8+
vectorDataField: string;
89
aggregationField?: string;
910
aggregationSize?: number;
1011
defaultQuery?: (...args: any[]) => any;
@@ -29,6 +30,7 @@ interface ReactiveListProps extends CommonProps {
2930
showResultStats?: boolean;
3031
showLoader?: boolean;
3132
size?: number;
33+
candidates?: number;
3234
sortBy?: types.sortBy;
3335
sortOptions?: types.sortOption[];
3436
onPageChange?: (...args: any[]) => any;

packages/vue/src/components/result/ReactiveList.jsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ const ReactiveList = {
106106
className: types.string,
107107
componentId: types.stringRequired,
108108
compoundClause: types.compoundClause,
109-
dataField: types.stringRequired,
109+
dataField: types.string,
110+
vectorDataField: types.string,
110111
aggregationField: types.string,
111112
aggregationSize: VueTypes.number,
112113
defaultQuery: types.func,
@@ -129,6 +130,7 @@ const ReactiveList = {
129130
showResultStats: VueTypes.bool.def(true),
130131
showEndPage: VueTypes.bool.def(false),
131132
size: VueTypes.number.def(10),
133+
candidates: VueTypes.number.def(10),
132134
sortBy: types.sortBy,
133135
sortOptions: types.sortOptions,
134136
URLParams: VueTypes.bool.def(false),

packages/vue/src/components/search/SearchBox.d.ts

+2
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@ export interface SearchBoxProps extends CommonProps {
1515
getMicInstance?: (...args: any[]) => any;
1616
renderMic?: (...args: any[]) => any;
1717
dataField?: types.dataFieldArray;
18+
vectorDataField?: string;
1819
enableSynonyms?: boolean;
1920
queryString?: boolean;
2021
enablePopularSuggestions?: boolean;
2122
enableRecentSuggestions?: boolean;
2223
aggregationField?: string;
2324
aggregationSize?: number;
2425
size?: number;
26+
candidates?: number;
2527
debounce?: number;
2628
defaultValue?: types.date;
2729
value?: types.date;

packages/vue/src/components/search/SearchBox.jsx

+2
Original file line numberDiff line numberDiff line change
@@ -260,9 +260,11 @@ const SearchBox = defineComponent({
260260
weight: VueTypes.number,
261261
}),
262262
]),
263+
vectorDataField: VueTypes.string,
263264
aggregationField: types.string,
264265
aggregationSize: VueTypes.number,
265266
size: VueTypes.number,
267+
candidates: VueTypes.number,
266268
debounce: VueTypes.number.def(0),
267269
defaultValue: types.string,
268270
excludeFields: types.excludeFields,

0 commit comments

Comments
 (0)