Closed irosgrim closed 4 years ago
Are you trying to accomplish the same as the demo? https://darrenjennings.github.io/vue-autosuggest/
The source for this demo is here:https://github.com/darrenjennings/vue-autosuggest/blob/master/docs/App.vue
Maybe you are missing the "label" in each section.
But do i need to add the sectionConfigs? I tried to do something similar to the example above i didn't use sectionConfigs. How do i dynamically create those labels?
the sectionConfig prop is like global static config, however we support it based on data source. So in that example, the filteredOptions
are being funnelled into the default
sectionConfig https://github.com/darrenjennings/vue-autosuggest/blob/master/docs/App.vue#L147 but then applying a unique label https://github.com/darrenjennings/vue-autosuggest/blob/master/docs/App.vue#L148.
Wow, that works. Thank you very much for taking the time to explain it. Best regards
Hello, This component is awesome. Very good work. I would like to divide the suggestions in sections. Basically a header for each list. I tried to follow the examples but i did not manage to get it working.
I have the array of objects with this structure:
[{name: SectionName, data: [array of suggestions]}, {name: SectionName, data: [array of suggestions]},...].
Then in the component: `
` The content is dynamic and the name is not known before hand.
I would greatly appreciate if you could help me with this. Thank you.