Skip to content

Commit

Permalink
fix(pivot): fix pivot fixed fiels bug (#5427)
Browse files Browse the repository at this point in the history
Signed-off-by: samuel.park <[email protected]>
  • Loading branch information
piggggggggy authored Jan 3, 2025
1 parent d82a767 commit 70685a9
Showing 1 changed file with 6 additions and 12 deletions.
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

0 comments on commit 70685a9

Please sign in to comment.