hide not searchable results when no term (#102401)
This commit is contained in:
parent
4447ca2a16
commit
d92ddf4b70
|
@ -120,6 +120,11 @@ describe('getAppResults', () => {
|
|||
],
|
||||
keywords: [],
|
||||
}),
|
||||
createApp({
|
||||
id: 'AppNotSearchable',
|
||||
title: 'App 1 not searchable',
|
||||
searchable: false,
|
||||
}),
|
||||
];
|
||||
|
||||
expect(getAppResults('', apps).length).toBe(1);
|
||||
|
|
|
@ -31,7 +31,8 @@ export const getAppResults = (
|
|||
.flatMap((app) =>
|
||||
term.length > 0
|
||||
? flattenDeepLinks(app)
|
||||
: [
|
||||
: app.searchable
|
||||
? [
|
||||
{
|
||||
id: app.id,
|
||||
app,
|
||||
|
@ -40,6 +41,7 @@ export const getAppResults = (
|
|||
keywords: app.keywords ?? [],
|
||||
},
|
||||
]
|
||||
: []
|
||||
)
|
||||
.map((appLink) => ({
|
||||
appLink,
|
||||
|
|
Loading…
Reference in a new issue