1
0
Fork 0
mirror of synced 2024-06-14 00:14:39 +12:00

Set a required constraint for a column that is defaulted to being the primary display

This commit is contained in:
Andrew Kingston 2022-03-21 09:44:24 +00:00
parent fa77eb5daf
commit bda27269f8

View file

@ -12,7 +12,7 @@
Modal,
notifications,
} from "@budibase/bbui"
import { createEventDispatcher } from "svelte"
import { createEventDispatcher, onMount } from "svelte"
import { cloneDeep } from "lodash/fp"
import { tables } from "stores/backend"
import { TableNames, UNEDITABLE_USER_FIELDS } from "constants"
@ -321,6 +321,12 @@
}
return newError
}
onMount(() => {
if (primaryDisplay) {
field.constraints.presence = { allowEmpty: false }
}
})
</script>
<ModalContent