Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(pivot): fix pivot fixed fiels bug #5427

Merged
merged 1 commit into from
Jan 3, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const state = reactive({
if (!state.proxyOperatorOptions.fields?.labels?.length) return true;
if (!state.proxyOperatorOptions.fields?.column) return true;
if (!state.proxyOperatorOptions.fields?.data) return true;
if (!state.proxyOperatorOptions.select && !state.proxyOperatorOptions.limit && state.proxyOperatorOptions?.fields?.column !== 'Date') return true;
if (!state.proxyOperatorOptions.select?.length && !state.proxyOperatorOptions.limit && state.proxyOperatorOptions?.fields?.column !== 'Date') return true;
return false;
}),
columnFieldInvalid: computed<boolean>(() => {
Expand Down Expand Up @@ -150,15 +150,8 @@ const handleChangeValueType = (value: string) => {
}
};
const handleSelectDynamicFields = (value?: MenuItem) => {
if (!value || !value.name) {
selectInfo.value = [];
return;
}
selectInfo.value = [
...(selectInfo.value ?? []),
value.name,
];
const handleSelectDynamicFields = (value?: MenuItem[]) => {
selectInfo.value = value?.map((item) => item.name as string) ?? [];
};
const handleUpdateLimit = (value: string) => {
limitInfo.value = parseInt(value);
Expand Down Expand Up @@ -316,14 +309,15 @@ onMounted(() => {
:menu="state.dynamicFieldItems"
:selected="state.selectedDynamicFieldMenuItems"
:loading="state.dynamicFieldLoading"
:invalid="!state.selectedDynamicFieldMenuItems.length"
use-fixed-menu-style
multi-selectable
appearance-type="badge"
show-select-marker
show-clear-selection
block
@select="handleSelectDynamicFields"
@clear-selection="handleSelectDynamicFields()"
@update:selected="handleSelectDynamicFields"
@clear-selection="handleSelectDynamicFields([])"
/>
<p-text-input v-else-if="state.proxyOperatorOptions.fields?.column !== 'Date'"
type="number"
Expand Down
Loading