| 12345678910111213141516171819202122232425262728293031323334353637 |
- import React, { FC } from 'react';
- import PropTypes from 'prop-types';
- import SearchPageForm from './SearchPageForm';
- import AppContainer from '../../client/services/AppContainer';
- type Props = {
- searchingKeyword: string,
- appContainer: AppContainer,
- onSearchInvoked: (data : any[]) => boolean,
- }
- const SearchControl: FC <Props> = (props: Props) => {
- // Temporaly workaround for lint error
- // later needs to be fixed: SearchControl to typescript componet
- const SearchPageFormTypeAny : any = SearchPageForm;
- return (
- <div className="">
- <div className="search-page-input sps sps--abv">
- <SearchPageFormTypeAny
- keyword={props.searchingKeyword}
- appContainer={props.appContainer}
- onSearchFormChanged={props.onSearchInvoked}
- />
- </div>
- {/* TODO: place deleteAll button , relevance button , include specificPath button */}
- </div>
- );
- };
- SearchControl.propTypes = {
- searchingKeyword: PropTypes.string.isRequired,
- appContainer: PropTypes.instanceOf(AppContainer).isRequired,
- onSearchInvoked: PropTypes.func,
- };
- export default SearchControl;
|