|
|
@@ -145,7 +145,6 @@ export default class SearchTypeahead extends React.Component {
|
|
|
const defaultSelected = (this.props.keywordOnInit != '')
|
|
|
? [{path: this.props.keywordOnInit}]
|
|
|
: [];
|
|
|
- const help = this.getHelpElement();
|
|
|
|
|
|
return (
|
|
|
<div className="search-typeahead">
|
|
|
@@ -165,34 +164,12 @@ export default class SearchTypeahead extends React.Component {
|
|
|
renderMenuItemChildren={this.renderMenuItemChildren}
|
|
|
caseSensitive={false}
|
|
|
defaultSelected={defaultSelected}
|
|
|
- promptText={help}
|
|
|
+ promptText={this.props.promptText}
|
|
|
/>
|
|
|
{restoreFormButton}
|
|
|
</div>
|
|
|
);
|
|
|
}
|
|
|
-
|
|
|
- getHelpElement() {
|
|
|
- return <table className="table table-borderd search-help">
|
|
|
- <caption>Search Help</caption>
|
|
|
- <tr>
|
|
|
- <td>keyword</td>
|
|
|
- <th>記事名 or カテゴリ or 本文にkeywordを含む</th>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td>title:keyword</td>
|
|
|
- <th>記事名にkeywordを含む</th>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td>a b</td>
|
|
|
- <th>文字列aとbを含む(スペース区切り)</th>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td>-keyword</td>
|
|
|
- <th>文字列keywordを含まない</th>
|
|
|
- </tr>
|
|
|
- </table>;
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -206,6 +183,7 @@ SearchTypeahead.propTypes = {
|
|
|
emptyLabel: PropTypes.string,
|
|
|
placeholder: PropTypes.string,
|
|
|
keywordOnInit: PropTypes.string,
|
|
|
+ promptText: PropTypes.object,
|
|
|
};
|
|
|
|
|
|
/**
|