Skip to content

Commit 95f0f5e

Browse files
author
J Logan
committed
Fixes #385 - filter input causes a toolbar view change.
- Entering a value into the pf-toolbar filter input box causes the toolbar viewConfig.viewSelected() handler to be invoked. This causes the view to change if a filter is keyed in while in any other view. This appears to happen because the return keypress is also interpreted as a click event, which triggers the ng-click handler for the view selection button.
1 parent 17a91f0 commit 95f0f5e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/filters/filter-fields-directive.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ angular.module('patternfly.filters').directive('pfFilterFields', function () {
6262

6363
scope.onValueKeyPress = function (keyEvent) {
6464
if (keyEvent.which === 13) {
65+
keyEvent.preventDefault();
6566
scope.addFilterFn(scope.currentField, scope.config.currentValue);
6667
scope.config.currentValue = undefined;
6768
}

0 commit comments

Comments
 (0)