Update searching
This commit is contained in:
parent
55a292529f
commit
e9b4f44fd6
7 changed files with 16 additions and 7 deletions
|
|
@ -28,7 +28,7 @@
|
||||||
gap: $unit-half;
|
gap: $unit-half;
|
||||||
|
|
||||||
h5 {
|
h5 {
|
||||||
color: var(--text-secondary);
|
color: var(--text-tertiary);
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
font-size: $font-medium;
|
font-size: $font-medium;
|
||||||
font-weight: $medium;
|
font-weight: $medium;
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,14 @@
|
||||||
display: block;
|
display: block;
|
||||||
padding: $unit-2x;
|
padding: $unit-2x;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
|
&.Bound {
|
||||||
|
background-color: var(--input-bound-bg);
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: var(--input-bound-bg-hover);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.InputError {
|
.InputError {
|
||||||
|
|
|
||||||
|
|
@ -16,11 +16,12 @@ const Input = React.forwardRef<HTMLInputElement, Props>(function input(
|
||||||
forwardedRef
|
forwardedRef
|
||||||
) {
|
) {
|
||||||
const classes = classNames({ Input: true }, props.className)
|
const classes = classNames({ Input: true }, props.className)
|
||||||
|
const { value, ...inputProps } = props
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<label className="Label" htmlFor={props.name}>
|
<label className="Label" htmlFor={props.name}>
|
||||||
<input
|
<input
|
||||||
{...props}
|
{...inputProps}
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
className={classes}
|
className={classes}
|
||||||
defaultValue={props.value || ''}
|
defaultValue={props.value || ''}
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
h5 {
|
h5 {
|
||||||
color: var(--text-secondary);
|
color: var(--text-tertiary);
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
font-size: $font-medium;
|
font-size: $font-medium;
|
||||||
font-weight: $medium;
|
font-weight: $medium;
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ const SearchModal = (props: Props) => {
|
||||||
setRecordCount(response.data.meta.count)
|
setRecordCount(response.data.meta.count)
|
||||||
|
|
||||||
if (replace) {
|
if (replace) {
|
||||||
replaceResults(response.data.count, response.data.results)
|
replaceResults(response.data.meta.count, response.data.results)
|
||||||
} else {
|
} else {
|
||||||
appendResults(response.data.results)
|
appendResults(response.data.results)
|
||||||
}
|
}
|
||||||
|
|
@ -330,7 +330,7 @@ const SearchModal = (props: Props) => {
|
||||||
<div id="Bar">
|
<div id="Bar">
|
||||||
<Input
|
<Input
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
className="Search"
|
className="Search Bound"
|
||||||
name="query"
|
name="query"
|
||||||
placeholder={props.placeholderText}
|
placeholder={props.placeholderText}
|
||||||
ref={searchInput}
|
ref={searchInput}
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
gap: $unit-half;
|
gap: $unit-half;
|
||||||
|
|
||||||
h5 {
|
h5 {
|
||||||
color: var(--text-secondary);
|
color: var(--text-tertiary);
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
font-size: $font-medium;
|
font-size: $font-medium;
|
||||||
font-weight: $medium;
|
font-weight: $medium;
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
gap: $unit-half;
|
gap: $unit-half;
|
||||||
|
|
||||||
h5 {
|
h5 {
|
||||||
color: var(--text-secondary);
|
color: var(--text-tertiary);
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
font-size: $font-medium;
|
font-size: $font-medium;
|
||||||
font-weight: $medium;
|
font-weight: $medium;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue