Skip to content
Snippets Groups Projects
Commit e1f9faee authored by Tomáš Havlíček's avatar Tomáš Havlíček
Browse files

feat: added search bar state, todo notes

parent 01e4baa3
No related branches found
No related tags found
No related merge requests found
...@@ -46,13 +46,15 @@ const resultsExample: MovieIO[] = [ ...@@ -46,13 +46,15 @@ const resultsExample: MovieIO[] = [
//for searching movies //for searching movies
export const SearchPage = () => { export const SearchPage = () => {
const [pressed, setPressed] = useState(false); const [pressed, setPressed] = useState(false);
const [searchValue, setSearch] = useState('');
//function that happens when search button is pressed //function that happens when search button is pressed
const onSearch = (value: string) => { const onSearch = (value: string) => {
console.log(value); console.log(searchValue); // just debug tool
setPressed(true); setPressed(true);
}; // API request search goes here }; // API request search goes here - request search with value inside variable "searchValue"
//columns stays the same
const columns = [ const columns = [
{ {
title: "Name", title: "Name",
...@@ -92,6 +94,7 @@ export const SearchPage = () => { ...@@ -92,6 +94,7 @@ export const SearchPage = () => {
allowClear allowClear
enterButton="Search" enterButton="Search"
size="large" size="large"
onChange={(e) => setSearch(e.target.value)}
onSearch={onSearch} onSearch={onSearch}
width="400 px" width="400 px"
/> />
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment