|
|
|
@ -65,6 +65,7 @@ const [useProvideLTARStore, useLTARStore] = useInjectionState(
|
|
|
|
|
query: '', |
|
|
|
|
size: 10, |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
const childrenExcludedOffsetCount = ref(0) |
|
|
|
|
|
|
|
|
|
const childrenListPagination = reactive({ |
|
|
|
@ -190,8 +191,7 @@ const [useProvideLTARStore, useLTARStore] = useInjectionState(
|
|
|
|
|
const loadChildrenExcludedList = async (activeState?: any) => { |
|
|
|
|
if (activeState) newRowState.state = activeState |
|
|
|
|
try { |
|
|
|
|
// todo: confirm the use case of `childrenExcludedOffsetCount.value`
|
|
|
|
|
let offset = childrenExcludedListPagination.size * (childrenExcludedListPagination.page - 1) |
|
|
|
|
let offset = childrenExcludedListPagination.size * (childrenExcludedListPagination.page - 1) - childrenExcludedOffsetCount.value |
|
|
|
|
|
|
|
|
|
if (offset < 0) { |
|
|
|
|
offset = 0 |
|
|
|
@ -550,6 +550,10 @@ const [useProvideLTARStore, useLTARStore] = useInjectionState(
|
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
const resetChildrenExcludedOffsetCount = () =>{ |
|
|
|
|
childrenExcludedOffsetCount.value = 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return { |
|
|
|
|
relatedTableMeta, |
|
|
|
|
loadRelatedTableMeta, |
|
|
|
@ -580,6 +584,7 @@ const [useProvideLTARStore, useLTARStore] = useInjectionState(
|
|
|
|
|
getRelatedTableRowId, |
|
|
|
|
headerDisplayValue, |
|
|
|
|
relatedTableDisplayValuePropId, |
|
|
|
|
resetChildrenExcludedOffsetCount |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
'ltar-store', |
|
|
|
|