mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-20 10:19:02 +00:00
@hasPolicy filter should include advanced settings (#276494)
This commit is contained in:
committed by
GitHub
parent
fa3fd970b6
commit
39d140db4b
@@ -360,7 +360,8 @@ export class SettingsEditor2 extends EditorPane {
|
|||||||
* Returns true if:
|
* Returns true if:
|
||||||
* - The setting is not tagged as advanced, OR
|
* - The setting is not tagged as advanced, OR
|
||||||
* - The setting matches an ID filter (@id:settingKey), OR
|
* - The setting matches an ID filter (@id:settingKey), OR
|
||||||
* - The setting key appears in the search query
|
* - The setting key appears in the search query, OR
|
||||||
|
* - The @hasPolicy filter is active (policy settings should always be shown when filtering by policy)
|
||||||
*/
|
*/
|
||||||
private shouldShowSetting(setting: ISetting): boolean {
|
private shouldShowSetting(setting: ISetting): boolean {
|
||||||
if (!setting.tags?.includes(ADVANCED_SETTING_TAG)) {
|
if (!setting.tags?.includes(ADVANCED_SETTING_TAG)) {
|
||||||
@@ -372,6 +373,9 @@ export class SettingsEditor2 extends EditorPane {
|
|||||||
if (this.viewState.query?.toLowerCase().includes(setting.key.toLowerCase())) {
|
if (this.viewState.query?.toLowerCase().includes(setting.key.toLowerCase())) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (this.viewState.tagFilters?.has(POLICY_SETTING_TAG)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user