Skip to content

Commit

Permalink
#3698: Fix advanced search
Browse files Browse the repository at this point in the history
  • Loading branch information
asafkaganbezgin committed Aug 11, 2021
1 parent f89e6bd commit ae2f4f1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 deletions.
20 changes: 9 additions & 11 deletions client/src/components/AdvancedSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,7 @@ import _cloneDeep from "lodash/cloneDeep"
import { Organization, Position } from "models"
import PropTypes from "prop-types"
import React, { useState } from "react"
import {
Button,
Col,
Dropdown,
FormControl,
FormGroup,
Row
} from "react-bootstrap"
import { Button, Col, Dropdown, FormGroup, Row } from "react-bootstrap"
import { connect } from "react-redux"
import { useHistory } from "react-router-dom"
import { POSITION_POSITION_TYPE_FILTER_KEY } from "searchUtils"
Expand Down Expand Up @@ -101,14 +94,15 @@ const AdvancedSearch = ({
{() => (
<div className="advanced-search form-horizontal">
<Form onSubmit={onSubmit}>
<FormGroup>
<FormGroup style={{ marginBottom: "15px" }}>
<ButtonGroupContainerS>
<ButtonToggleGroup
value={objectType}
onChange={changeObjectType}
>
{possibleFilterTypes.map(type => (
<Button
variant="outline-secondary"
key={type}
value={type}
disabled={possibleFilterTypes.length < 2}
Expand Down Expand Up @@ -138,9 +132,13 @@ const AdvancedSearch = ({
</ButtonGroupContainerS>
</FormGroup>

<FormControl defaultValue={text} className="hidden" />
{/* FIXME: Seems like a reduntand input field. */}
{/* <FormControl defaultValue={text} className="hidden" /> */}

<div className="advanced-search-content">
<div
className="advanced-search-content"
style={{ paddingLeft: "15px" }}
>
{filters.map(
filter =>
filterDefs[filter.key] && (
Expand Down
14 changes: 12 additions & 2 deletions client/src/components/SearchBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,18 @@ const SearchBar = ({
id="searchBarInput"
/>
{!showAdvancedSearch && (
<Button onClick={onSubmit} id="searchBarSubmit">
<img src={SEARCH_ICON} height={16} alt="Search" />
<Button
onClick={onSubmit}
id="searchBarSubmit"
variant="outline-light"
style={{ borderColor: "#ced4da" }}
>
<img
src={SEARCH_ICON}
height={16}
alt="Search"
style={{ color: "white" }}
/>
</Button>
)}
</InputGroup>
Expand Down

0 comments on commit ae2f4f1

Please sign in to comment.