aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/components/App.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/App-test.tsx.snap2
2 files changed, 4 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/App.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/App.tsx
index 78c1e827e91..fb335dddd5c 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/components/App.tsx
+++ b/server/sonar-web/src/main/js/apps/coding-rules/components/App.tsx
@@ -81,6 +81,7 @@ import RuleDetails from './RuleDetails';
import RuleListItem from './RuleListItem';
const PAGE_SIZE = 100;
+const MAX_SEARCH_LENGTH = 200;
const LIMIT_BEFORE_LOAD_MORE = 5;
interface StateToProps {
@@ -600,6 +601,7 @@ export class App extends React.PureComponent<Props, State> {
<SearchBox
className="spacer-bottom"
id="coding-rules-search"
+ maxLength={MAX_SEARCH_LENGTH}
minLength={2}
onChange={this.handleSearch}
placeholder={translate('search.search_for_rules')}
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/App-test.tsx.snap b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/App-test.tsx.snap
index 8339287fb2d..247c393d511 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/App-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/App-test.tsx.snap
@@ -66,6 +66,7 @@ exports[`should render correctly: loaded (ScreenPositionHelper) 1`] = `
<SearchBox
className="spacer-bottom"
id="coding-rules-search"
+ maxLength={200}
minLength={2}
onChange={[Function]}
placeholder="search.search_for_rules"
@@ -362,6 +363,7 @@ exports[`should render correctly: open rule (ScreenPositionHelper) 1`] = `
<SearchBox
className="spacer-bottom"
id="coding-rules-search"
+ maxLength={200}
minLength={2}
onChange={[Function]}
placeholder="search.search_for_rules"