Skip to content

Commit

Permalink
Fix search (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
ameen4455 authored Sep 30, 2022
1 parent 200735e commit 1481947
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
7 changes: 5 additions & 2 deletions src/page/Dashboard/Filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export default function Filters({
addMeta,
addFilter,
removeFilter,
setSearchQuery,
}) {
const [columnValue, setColumnValue] = useState();
const [operator, setOperator] = useState({ name: "Contains" });
Expand Down Expand Up @@ -56,9 +57,11 @@ export default function Filters({

return (
<Popover className="relative ml-3 flex-1">
<label className="text-label" htmlFor="">Search & Filter</label>
<label className="text-label" htmlFor="">
Search & Filter
</label>
<div className="flex mt-1">
<Searchbar />
<Searchbar setSearchQuery={setSearchQuery}/>
<Popover.Button className={"input rounded-l-none w-min text-left flex"}>
<span className={"block mr-1"}>Filter</span>
{filter.length ? <Pill text={`${filter.length}`} /> : null}
Expand Down
2 changes: 1 addition & 1 deletion src/page/Dashboard/Searchbar.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { SearchIcon } from "@heroicons/react/solid";

function Searchbar(setSearchQuery) {
function Searchbar({ setSearchQuery }) {
return (
<div className="relative cursor-default">
<div className="flex flex-col">
Expand Down
3 changes: 1 addition & 2 deletions src/page/Dashboard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import DateSearchField from "./DateSearchField";
import Field from "./FieldBox";
import Filters from "./Filters";
import Layout from "../../components/Layout";
import RefreshInterval from "./RefreshInterval";
import SearchableDropdown from "../../components/SearchableDropdown";
import SideDialog from "../../components/SideDialog";
import Table from "./Table";
Expand Down Expand Up @@ -249,7 +248,6 @@ const Dashboard = () => {
endTime={endTime}
setRange={setRange}
getRange={getRange}
setSearchQuery={setSearchQuery}
logQueries={logQueries}
interval={interval}
setInterval={setInterval}
Expand All @@ -267,6 +265,7 @@ const Dashboard = () => {
addMeta={addMeta}
addFilter={addFilter}
removeFilter={removeFilter}
setSearchQuery={setSearchQuery}
/>
</div>
<div className="overflow-x-auto min-w-0">
Expand Down

0 comments on commit 1481947

Please sign in to comment.