diff --git a/webclient/src/Storage.js b/webclient/src/Storage.js index 9f340a7..2d20ec8 100644 --- a/webclient/src/Storage.js +++ b/webclient/src/Storage.js @@ -3,7 +3,7 @@ import { Link, useParams, useHistory } from 'react-router-dom'; import './light.css'; import { MembersDropdown } from './Members.js'; import { isAdmin, BasicTable, requester, useIsMobile } from './utils.js'; -import { Button, Container, Form, Grid, Header, Icon, Message, Segment, Table } from 'semantic-ui-react'; +import { Button, Container, Form, Grid, Header, Icon, Input, Message, Segment, Table } from 'semantic-ui-react'; export function StorageEditor(props) { const { token, input, setInput, error } = props; @@ -235,9 +235,50 @@ export function StorageButton(props) { ); }; +let storageSearchCache = ''; + +export function StorageSearch(props) { + const { setSearch } = props; + const [input, setInput] = useState(storageSearchCache); + + const handleChange = (event) => { + const q = event.target.value.toUpperCase(); + setInput(q); + setSearch(q); + storageSearchCache = q; + }; + + return ( +
@@ -260,19 +310,22 @@ export function StorageList(props) {