- Made the reorder icon having indicator and move it outside the search box
This commit is contained in:
1 parent
6f4c606356
commit
b5409f0c0f
1 file changed
+30
-22
@@ -1,7 +1,11 @@
|
|||||||
import { ServerStartAdornment, ServerEndAdornment } from "../../../../Inputs/TextInput/Adornments";
|
import {
|
||||||
|
ServerEndAdornment,
|
||||||
|
} from "../../../../Inputs/TextInput/Adornments";
|
||||||
import Search from "../../../../Inputs/Search";
|
import Search from "../../../../Inputs/Search";
|
||||||
import {useState} from "react"
|
import { useState } from "react";
|
||||||
|
import ReorderRoundedIcon from "@mui/icons-material/ReorderRounded";
|
||||||
|
import { Stack, IconButton } from "@mui/material";
|
||||||
|
import React from "react";
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {*} id The Id of the Server component
|
* @param {*} id The Id of the Server component
|
||||||
@@ -12,30 +16,34 @@ import {useState} from "react"
|
|||||||
* @param {*} value the option label of the server/monitor, namely the monitor name field
|
* @param {*} value the option label of the server/monitor, namely the monitor name field
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
const Server = ({ id, removeItem, onChange, monitors, value }) => {
|
const Server = (props) => {
|
||||||
const [search, setSearch] = useState("");
|
const [search, setSearch] = useState("");
|
||||||
const handleSearch = (val) => {
|
const handleSearch = (val) => {
|
||||||
setSearch(val);
|
setSearch(val);
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
<Search
|
<Stack direction={"row"}>
|
||||||
id={id}
|
<IconButton>
|
||||||
multiple={false}
|
<ReorderRoundedIcon />
|
||||||
isAdorned={false}
|
</IconButton>
|
||||||
options={monitors ? monitors : []}
|
<Search
|
||||||
filteredBy="name"
|
id={props.id}
|
||||||
inputValue={search}
|
multiple={false}
|
||||||
value={value}
|
isAdorned={false}
|
||||||
startAdornment={<ServerStartAdornment />}
|
options={props.monitors ? props.monitors : []}
|
||||||
endAdornment={
|
filteredBy="name"
|
||||||
<ServerEndAdornment
|
inputValue={search}
|
||||||
id={id}
|
value={props.value}
|
||||||
removeItem={removeItem}
|
endAdornment={
|
||||||
/>
|
<ServerEndAdornment
|
||||||
}
|
id={props.id}
|
||||||
handleInputChange={handleSearch}
|
removeItem={props.removeItem}
|
||||||
handleChange={onChange}
|
/>
|
||||||
/>
|
}
|
||||||
|
handleInputChange={handleSearch}
|
||||||
|
handleChange={props.onChange}
|
||||||
|
/>
|
||||||
|
</Stack>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user