Merge remote-tracking branch 'origin/master' into s3-upload-fixes

This commit is contained in:
Dean 2025-01-02 15:27:03 +00:00
commit b15399ab81
4 changed files with 34 additions and 8 deletions

View File

@ -1,6 +1,6 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"version": "3.2.29",
"version": "3.2.32",
"npmClient": "yarn",
"concurrency": 20,
"command": {

View File

@ -291,8 +291,8 @@ const automationActions = (store: AutomationStore) => ({
let result: (AutomationStep | AutomationTrigger)[] = []
pathWay.forEach(path => {
const { stepIdx, branchIdx } = path
let last = result ? result[result.length - 1] : []
if (!result) {
let last = result.length ? result[result.length - 1] : []
if (!result.length) {
// Preceeding steps.
result = steps.slice(0, stepIdx + 1)
return

View File

@ -26,7 +26,7 @@
: RelationshipType.MANY_TO_MANY,
}
async function searchFunction(searchParams) {
async function searchFunction(_tableId, searchParams) {
if (
subtype !== BBReferenceFieldSubType.USER &&
subtype !== BBReferenceFieldSubType.USERS

View File

@ -151,6 +151,35 @@ export const initialise = (context: StoreContext) => {
})
)
function sortHasChanged(
newSort: {
column: string | null | undefined
order: SortOrder
},
existingSort?: {
field: string
order?: SortOrder
}
) {
const newColumn = newSort.column ?? null
const existingColumn = existingSort?.field ?? null
if (newColumn !== existingColumn) {
return true
}
if (!newColumn) {
return false
}
const newOrder = newSort.order ?? null
const existingOrder = existingSort?.order ?? null
if (newOrder !== existingOrder) {
return true
}
return false
}
// When sorting changes, ensure view definition is kept up to date
unsubscribers.push(
sort.subscribe(async $sort => {
@ -161,10 +190,7 @@ export const initialise = (context: StoreContext) => {
}
// Skip if nothing actually changed
if (
$sort?.column === $view.sort?.field &&
$sort?.order === $view.sort?.order
) {
if (!sortHasChanged($sort, $view.sort)) {
return
}