mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-01 03:51:59 +08:00
[Feat]: added iscolumn in option rendering (#4334)
* feat: added iscolumn in option rendering * chore: build failure * fix: build failure
This commit is contained in:
parent
bb558dde8e
commit
1163c16506
@ -81,6 +81,7 @@ export const AggregatorFilter = memo(function AggregatorFilter({
|
|||||||
}),
|
}),
|
||||||
)}
|
)}
|
||||||
dataType={item.dataType}
|
dataType={item.dataType}
|
||||||
|
isColumn={item.isColumn}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
value: `${item.key}${selectValueDivider}${createIdFromObjectFields(
|
value: `${item.key}${selectValueDivider}${createIdFromObjectFields(
|
||||||
|
@ -81,6 +81,7 @@ export const GroupByFilter = memo(function GroupByFilter({
|
|||||||
}),
|
}),
|
||||||
)}
|
)}
|
||||||
dataType={item.dataType || ''}
|
dataType={item.dataType || ''}
|
||||||
|
isColumn={item.isColumn}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
value: `${transformStringWithPrefix({
|
value: `${transformStringWithPrefix({
|
||||||
|
@ -10,6 +10,7 @@ function OptionRenderer({
|
|||||||
label,
|
label,
|
||||||
value,
|
value,
|
||||||
dataType,
|
dataType,
|
||||||
|
isColumn,
|
||||||
}: OptionRendererProps): JSX.Element {
|
}: OptionRendererProps): JSX.Element {
|
||||||
const optionType = getOptionType(label);
|
const optionType = getOptionType(label);
|
||||||
|
|
||||||
@ -27,6 +28,10 @@ function OptionRenderer({
|
|||||||
<TagLabel>Data type: </TagLabel>
|
<TagLabel>Data type: </TagLabel>
|
||||||
<TagValue>{dataType}</TagValue>
|
<TagValue>{dataType}</TagValue>
|
||||||
</TagContainer>
|
</TagContainer>
|
||||||
|
<TagContainer>
|
||||||
|
<TagLabel>isColumn: </TagLabel>
|
||||||
|
<TagValue>{isColumn ? 'True' : 'False'}</TagValue>
|
||||||
|
</TagContainer>
|
||||||
</div>
|
</div>
|
||||||
</SelectOptionContainer>
|
</SelectOptionContainer>
|
||||||
) : (
|
) : (
|
||||||
@ -40,6 +45,7 @@ interface OptionRendererProps {
|
|||||||
label: string;
|
label: string;
|
||||||
value: string;
|
value: string;
|
||||||
dataType: string;
|
dataType: string;
|
||||||
|
isColumn: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default OptionRenderer;
|
export default OptionRenderer;
|
||||||
|
@ -210,6 +210,7 @@ function QueryBuilderSearch({
|
|||||||
label={option.label}
|
label={option.label}
|
||||||
value={option.value}
|
value={option.value}
|
||||||
dataType={option.dataType || ''}
|
dataType={option.dataType || ''}
|
||||||
|
isColumn={option.isColumn || false}
|
||||||
/>
|
/>
|
||||||
{option.selected && <StyledCheckOutlined />}
|
{option.selected && <StyledCheckOutlined />}
|
||||||
</Select.Option>
|
</Select.Option>
|
||||||
|
@ -15,4 +15,5 @@ export type Option = {
|
|||||||
label: string;
|
label: string;
|
||||||
selected?: boolean;
|
selected?: boolean;
|
||||||
dataType?: string;
|
dataType?: string;
|
||||||
|
isColumn?: boolean;
|
||||||
};
|
};
|
||||||
|
@ -44,6 +44,7 @@ export const useOptions = (
|
|||||||
label: `${getLabel(item)}`,
|
label: `${getLabel(item)}`,
|
||||||
value: item.key,
|
value: item.key,
|
||||||
dataType: item.dataType,
|
dataType: item.dataType,
|
||||||
|
isColumn: item.isColumn,
|
||||||
})),
|
})),
|
||||||
[getLabel],
|
[getLabel],
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user