mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-08 16:18:59 +08:00
feat: tag value suggestion is updated
This commit is contained in:
parent
d4d1104a53
commit
5556d1d6fc
@ -51,7 +51,7 @@ function DebounceSelect<
|
|||||||
filterOption={false}
|
filterOption={false}
|
||||||
onSearch={debounceFetcher}
|
onSearch={debounceFetcher}
|
||||||
notFoundContent={fetching ? <Spin size="small" /> : null}
|
notFoundContent={fetching ? <Spin size="small" /> : null}
|
||||||
style={{ minWidth: '170px' }}
|
style={{ width: '170px' }}
|
||||||
// as all other props are from SelectProps only
|
// as all other props are from SelectProps only
|
||||||
// eslint-disable-next-line react/jsx-props-no-spreading
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
||||||
{...props}
|
{...props}
|
||||||
|
@ -21,12 +21,8 @@ export async function fetchTag(
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(response.payload);
|
return response.payload.map((e) => ({
|
||||||
|
label: e.tagValues,
|
||||||
return [
|
value: e.tagValues,
|
||||||
{
|
}));
|
||||||
label: 'asd',
|
|
||||||
value: 'asd',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
@ -83,27 +83,22 @@ function SingleTags(props: AllTagsProps): JSX.Element {
|
|||||||
|
|
||||||
<DebounceSelect
|
<DebounceSelect
|
||||||
fetchOptions={(): Promise<TagValue[]> =>
|
fetchOptions={(): Promise<TagValue[]> =>
|
||||||
fetchTag(globalReducer.minTime, globalReducer.maxTime, selectedKey[0])
|
fetchTag(globalReducer.minTime, globalReducer.maxTime, selectedKey[index])
|
||||||
}
|
}
|
||||||
debounceTimeout={300}
|
debounceTimeout={300}
|
||||||
mode="tags"
|
onSelect={(value: Value): void => {
|
||||||
/>
|
|
||||||
|
|
||||||
{/* <ValueSelect
|
|
||||||
value={selectedValues}
|
|
||||||
onChange={(value): void => {
|
|
||||||
setLocalSelectedTags((tags) => [
|
setLocalSelectedTags((tags) => [
|
||||||
...tags.slice(0, index),
|
...tags.slice(0, index),
|
||||||
{
|
{
|
||||||
Key: selectedKey,
|
Key: selectedKey,
|
||||||
Operator: selectedOperator,
|
Operator: selectedOperator,
|
||||||
Values: value as string[],
|
Values: [...selectedValues, value.value],
|
||||||
},
|
},
|
||||||
...tags.slice(index + 1, tags.length),
|
...tags.slice(index + 1, tags.length),
|
||||||
]);
|
]);
|
||||||
}}
|
}}
|
||||||
mode="tags"
|
mode="multiple"
|
||||||
/> */}
|
/>
|
||||||
|
|
||||||
<IconContainer role="button" onClick={(): void => onDeleteTagHandler(index)}>
|
<IconContainer role="button" onClick={(): void => onDeleteTagHandler(index)}>
|
||||||
<CloseOutlined />
|
<CloseOutlined />
|
||||||
@ -121,4 +116,10 @@ interface AllTagsProps {
|
|||||||
>;
|
>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface Value {
|
||||||
|
key: string;
|
||||||
|
label: string;
|
||||||
|
value: string;
|
||||||
|
}
|
||||||
|
|
||||||
export default SingleTags;
|
export default SingleTags;
|
||||||
|
@ -6,6 +6,8 @@ export interface Props {
|
|||||||
tagKey: string;
|
tagKey: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PayloadProps {
|
interface Value {
|
||||||
key: string;
|
tagValues: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type PayloadProps = Value[];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user