Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const CancelButton = () => {
return (
<Button
danger={true}
htmlType={"button"}
icon={<CloseOutlined/>}
size={"large"}
type={"primary"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ const SubmitButton = () => {
<Button
className={styles["gradientButton"] || ""}
disabled={isQueryStringEmpty || searchUiState === SEARCH_UI_STATE.QUERY_ID_PENDING}
htmlType={"submit"}
icon={<SearchOutlined/>}
size={"large"}
type={"primary"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,29 @@ import SearchButton from "./SearchButton/SearchButton";
import TimeRangeInput from "./TimeRangeInput";


/**
* Prevents the default behavior to avoid page reload when submitting query.
*
* @param ev
*/
const handleSubmit = (ev: React.FormEvent<HTMLFormElement>) => {
ev.preventDefault();
};

/**
* Renders controls for submitting queries.
*
* @return
*/
const SearchControls = () => {
return (
<div className={styles["searchControlsContainer"]}>
<QueryInput/>
<TimeRangeInput/>
<SearchButton/>
</div>
<form onSubmit={handleSubmit}>
<div className={styles["searchControlsContainer"]}>
<QueryInput/>
<TimeRangeInput/>
<SearchButton/>
</div>
</form>
);
};

Expand Down