SearchResultList.jsx 923 B

1234567891011121314151617181920212223242526272829303132
  1. import React from 'react';
  2. import PropTypes from 'prop-types';
  3. import SearchResultListItem from './SearchResultListItem';
  4. class SearchResultList extends React.Component {
  5. render() {
  6. return this.props.pages.map((page) => {
  7. // TODO : send cetain length of body (revisionBody) from elastisearch by adding some settings to the query and
  8. // when keyword is not in page content, display revisionBody.
  9. // TASK : https://estoc.weseek.co.jp/redmine/issues/79606
  10. return (
  11. <SearchResultListItem
  12. page={page}
  13. onClickInvoked={this.props.onClickInvoked}
  14. noLink
  15. />
  16. );
  17. });
  18. }
  19. }
  20. SearchResultList.propTypes = {
  21. pages: PropTypes.array.isRequired,
  22. deletionMode: PropTypes.bool.isRequired,
  23. selectedPages: PropTypes.array.isRequired,
  24. onClickInvoked: PropTypes.func,
  25. onChangeInvoked: PropTypes.func,
  26. };
  27. export default SearchResultList;