Skip to content

Commit 67ffe4a

Browse files
authored
Remove option to keep input when selecting a new tag (#802) rdar://124954232
Remove option to keep input when selecting a new tag (#802) rdar://124954232
1 parent 938093e commit 67ffe4a

File tree

6 files changed

+4
-22
lines changed

6 files changed

+4
-22
lines changed

src/components/Filter/FilterInput.vue

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!--
22
This source file is part of the Swift.org open source project
33
4-
Copyright (c) 2022-2023 Apple Inc. and the Swift project authors
4+
Copyright (c) 2022-2024 Apple Inc. and the Swift project authors
55
Licensed under Apache License v2.0 with Runtime Library Exception
66
77
See https://swift.org/LICENSE.txt for license information
@@ -208,10 +208,6 @@ export default {
208208
type: Boolean,
209209
default: false,
210210
},
211-
clearFilterOnTagSelect: {
212-
type: Boolean,
213-
default: true,
214-
},
215211
preventBorderStyle: {
216212
type: Boolean,
217213
default: false,

src/components/Navigator/NavigatorCard.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@
106106
:should-keep-open-on-blur="false"
107107
:shouldTruncateTags="shouldTruncateTags"
108108
:position-reversed="!renderFilterOnTop"
109-
:clear-filter-on-tag-select="false"
110109
class="filter-component"
111110
@clear="clearFilters"
112111
/>

src/mixins/multipleSelection.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* This source file is part of the Swift.org open source project
33
*
4-
* Copyright (c) 2022 Apple Inc. and the Swift project authors
4+
* Copyright (c) 2022-2024 Apple Inc. and the Swift project authors
55
* Licensed under Apache License v2.0 with Runtime Library Exception
66
*
77
* See https://swift.org/LICENSE.txt for license information
@@ -55,7 +55,6 @@ export default {
5555

5656
selectTag(tag) {
5757
this.updateSelectedTags([tag]);
58-
if (!this.clearFilterOnTagSelect) return;
5958
this.setFilterInput('');
6059
},
6160

tests/unit/components/Filter/FilterInput.spec.js

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* This source file is part of the Swift.org open source project
33
*
4-
* Copyright (c) 2022-2023 Apple Inc. and the Swift project authors
4+
* Copyright (c) 2022-2024 Apple Inc. and the Swift project authors
55
* Licensed under Apache License v2.0 with Runtime Library Exception
66
*
77
* See https://swift.org/LICENSE.txt for license information
@@ -650,16 +650,6 @@ describe('FilterInput', () => {
650650
expect(wrapper.emitted('input')).toEqual([['']]);
651651
});
652652

653-
it('adds tag to `selectedTags` when it is clicked, without clearing the filter', () => {
654-
wrapper.setProps({
655-
clearFilterOnTagSelect: false,
656-
});
657-
const selectedTag = 'Tag1';
658-
suggestedTags.vm.$emit('click-tags', { tagName: selectedTag });
659-
expect(wrapper.emitted('update:selectedTags')).toEqual([[[selectedTag]]]);
660-
expect(wrapper.emitted('input')).toBeFalsy();
661-
});
662-
663653
describe('when a tag is selected', () => {
664654
let selectedTagsComponent;
665655
const selectedTag = 'Tag1';

tests/unit/components/Navigator/NavigatorCard.spec.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,6 @@ describe('NavigatorCard', () => {
307307
],
308308
value: '',
309309
selectInputOnFocus: false,
310-
clearFilterOnTagSelect: false,
311310
});
312311
});
313312

tests/unit/components/Navigator/QuickNavigationModal.spec.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* This source file is part of the Swift.org open source project
33
*
4-
* Copyright (c) 2022-2023 Apple Inc. and the Swift project authors
4+
* Copyright (c) 2022-2024 Apple Inc. and the Swift project authors
55
* Licensed under Apache License v2.0 with Runtime Library Exception
66
*
77
* See https://swift.org/LICENSE.txt for license information
@@ -150,7 +150,6 @@ describe('QuickNavigationModal', () => {
150150
tags: [],
151151
translatableTags: [],
152152
selectInputOnFocus: true,
153-
clearFilterOnTagSelect: true,
154153
});
155154
});
156155

0 commit comments

Comments
 (0)