Skip to content

Commit

Permalink
feat: add base suggestion to playground
Browse files Browse the repository at this point in the history
  • Loading branch information
andreadlgdo committed May 27, 2024
1 parent 34bd833 commit f3851dc
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/_vue3-migration-test/src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ export { default as TestBaseColumnPickerDropdown } from './column-picker/test-ba
export { default as TestBaseColumnPickerList } from './column-picker/test-base-column-picker-list.vue';
export { default as TestBaseDropdown } from './test-base-dropdown.vue';
export { default as TestBaseEventButton } from './test-base-event-button.vue';
export { default as TestBaseSuggestions } from './test-base-suggestions.vue';
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<template>
<BaseSuggestions :suggestions="suggestions">
<template #default="{ suggestion }">
<span>{{ suggestion.query }}</span>
</template>
</BaseSuggestions>
</template>

<script setup>
import BaseSuggestions from '../../../x-components/src/components/suggestions/base-suggestions.vue';
const suggestions = [
{
facets: [],
key: 'chips',
query: 'Chips',
totalResults: 10,
results: [],
modelName: 'PopularSearch'
},
{
facets: [],
key: 'apples',
query: 'Apples',
totalResults: 5,
results: [],
modelName: 'PopularSearch'
}
];
</script>

<style scoped></style>
8 changes: 7 additions & 1 deletion packages/_vue3-migration-test/src/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ import {
TestSortList,
TestSortPickerList,
TestBaseScroll,
TestSearchBox
TestSearchBox,
TestBaseSuggestions
} from './';

const routes = [
Expand Down Expand Up @@ -104,6 +105,11 @@ const routes = [
path: '/elements-list',
name: 'ElementsList',
component: TestElementsList
},
{
path: '/base-suggestions',
name: 'BaseSuggestions',
component: TestBaseSuggestions
}
];

Expand Down

0 comments on commit f3851dc

Please sign in to comment.