mirror of
https://github.com/SigNoz/signoz.git
synced 2025-12-29 16:14:42 +00:00
feat: code refactor
This commit is contained in:
parent
1156beba75
commit
441eac632c
@ -74,11 +74,12 @@ export const useOptions = (
|
|||||||
(key: string, results: string[], searchValue: string) => {
|
(key: string, results: string[], searchValue: string) => {
|
||||||
const hasAllResults = results.every((value) => result.includes(value));
|
const hasAllResults = results.every((value) => result.includes(value));
|
||||||
|
|
||||||
|
let newResults = results;
|
||||||
if (!isEmpty(variableAsValue)) {
|
if (!isEmpty(variableAsValue)) {
|
||||||
results.unshift(variableAsValue);
|
newResults = [variableAsValue, ...newResults];
|
||||||
}
|
}
|
||||||
|
|
||||||
const values = getKeyOpValue(results);
|
const values = getKeyOpValue(newResults);
|
||||||
|
|
||||||
return hasAllResults
|
return hasAllResults
|
||||||
? [
|
? [
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user