How customizable ResultView can be? I have been trying to create my own view where every search hit is listed in the result body without success and not where what to modify to make it work. Any workarunds? Could a React component be passed?
Current output
Foo
ID: Foo
Hits: "This is a test. I have tested something."
Wanted output
Foo
ID: Foo
Hits:
- Hit 1: "This is a test."
- Hit 2: "I have tested something."
Code
import React from "react";
export default ({ result }) => (
<li className="sui-result">
<div className="sui-result__header">
<span
className="sui-result__title"
dangerouslySetInnerHTML={{ __html: result.id.snippet }}
/>
</div>
<div className="sui-result__body">
<ul className="sui-result__details">
<li>
<span className="sui-result__key">ID</span>{" "}
<span
className="sui-result__value"
dangerouslySetInnerHTML={{
__html: result.id.raw
}}
/>
</li>
<li>
<span className="sui-result__key">Contents</span>{" "}
<span
className="sui-result__value"
dangerouslySetInnerHTML={{
__html: result.description.snippet
}}
/>
</li>
</ul>
<p>result.description.snippet</p>
</div>
</li>
);