How to show search?
See original GitHub issueI want to construct a simple hello world search example application, but the README does not show how one is supposed to actually show the search. How can I tell itemsjs where my container is so that it is shown?
I cannot follow the examples because they all use external frameworks like Vue and React, which I don’t.
Is it impossible to use itemsjs without Vue and React?
At https://jsfiddle.net/wnhao0qc/1/ is my example:
HTML
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<script src="https://unpkg.com/itemsjs@latest/dist/itemsjs.min.js"></script>
</head>
<body onload="main();">
</body>
</html>
JavaScript
const config = {
sortings: {
bezeichnung: {
field: 'id',
order: 'asc'
}
},
aggregations: {
tags: {
title: 'begriffsklasse',
size: 3
}
},
searchableFields: ['id', 'synonyme','definition','begriffsklasse']
};
const data = [
{id: "id1", name: "peter"},
{id: "id2", name: "bob"},
{id: "id3", name: "alice"}
];
function main()
{
itemsjs = itemsjs(data, config);
const search = itemsjs.search(); // <<<<<<<<<<------- this should create the search UI but nothing happens, the screen is blank
console.log(search);
}
The problem is that itemsjs.search() does nothing, which is understandable, because I didn’t point it to a rendering container. What do I to do to show it?
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
Search for anything, anywhere - Microsoft Support
To get search results from your PC and the web, tap or click the search icon , and type what you're looking for...
Read more >Is the Windows 10 Search bar missing? 6 ways to show it
To get the Windows 10 Search bar back, right-click or press-and-hold on an empty area on your taskbar to open a contextual menu....
Read more >Windows 10 - Enable/Disable Search Box - YouTube
Windows 10 - Enable/Disable Search Box While the search box in Windows 10 can be convenient, sometimes it might take up too …...
Read more >Hide and Show Search Box on Taskbar in Windows 10
After entering Taskbar and Start Menu Properties, open Toolbars, click the down arrow, choose Show search box from the options and hit OK....
Read more >Windows 10 Search Bar Missing? Here Are 6 Solutions
Right-click the Taskbar and then click Cortana to choose Show search box. enable the search bar from Cortana's settings. After you finish the ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello @KonradHoeffner and @cigolpl,
We created an adapter to link Itemjs with Instantsearch, I think this is a solution to your problem! https://github.com/unplatform-io/instantsearch-itemsjs-adapter
@Ruitjes I’ve put a gif of your demo on the main page. I am aware that maybe it’s not 100% ready but it is already more functional than previous demo and it has code so it is easy to start with it a new project or learn Instantsearch. We can update this gif at any time in the future if there will be a need