Commit e0197eb2 authored by Muneeb Saeed's avatar Muneeb Saeed

Css added for facets

parent 27dd9978
.verticalCheckBox > .ant-checkbox-wrapper { .verticalCheckBox > .ant-checkbox-wrapper {
display: flex; display: flex;
margin-inline-start: 0; margin-inline-start: 0;
}
.verticalCheckBox {
display: block;
} }
\ No newline at end of file
...@@ -83,7 +83,7 @@ const SearchResults = ({ searchResults, facets, onSelectFacet, onSelectFilter }) ...@@ -83,7 +83,7 @@ const SearchResults = ({ searchResults, facets, onSelectFacet, onSelectFilter })
{ facets.length > 0 && facets.map((facet, i) => { facets.length > 0 && facets.map((facet, i) =>
<Collapse ghost> <Collapse ghost>
<Panel header={facetMap.get(facet.key)} key={i} style={{ fontSize: '0.9rem', color: '#000000 ' }}> <Panel header={facetMap.get(facet.key)} key={i} style={{ fontSize: '0.9rem', color: '#000000 ' }}>
<Checkbox.Group className="verticalCheckBox" options={[...facet.values.map((f) => ({label: f.value, value: f.value}) )]} <Checkbox.Group className={'verticalCheckBox'} options={[...facet.values.map((f) => ({label: f.value, value: f.value}) )]}
onChange={(val) => onChangeCheckboxHandler(val, facet.key)} /> onChange={(val) => onChangeCheckboxHandler(val, facet.key)} />
</Panel> </Panel>
</Collapse> </Collapse>
......
...@@ -24,7 +24,6 @@ const Search = () => { ...@@ -24,7 +24,6 @@ const Search = () => {
const { searchQuery, facets, filters } = payload; const { searchQuery, facets, filters } = payload;
if (searchQuery) { if (searchQuery) {
const apiEndpoint = 'https://api-dot-abs-poc-np-prj-01-3f2a.uc.r.appspot.com'; const apiEndpoint = 'https://api-dot-abs-poc-np-prj-01-3f2a.uc.r.appspot.com';
// const apiEndpoint = 'http://localhost:8080';
const url = `${apiEndpoint}/search?text=${searchQuery}${facets.length? `&facets=${JSON.stringify(facets)}` : ''}${filters && Object.keys(filters).length? `&filters=${JSON.stringify(filters)}` : ''}`; const url = `${apiEndpoint}/search?text=${searchQuery}${facets.length? `&facets=${JSON.stringify(facets)}` : ''}${filters && Object.keys(filters).length? `&filters=${JSON.stringify(filters)}` : ''}`;
const searchResults = await fetch(url) const searchResults = await fetch(url)
.then(res => res.json()) .then(res => res.json())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment