Remove checkbox. Always validate current step.

This commit is contained in:
Mel O'Hagan 2022-07-20 09:56:02 +01:00
parent 5d8efe40eb
commit 40ef719f2f
3 changed files with 3 additions and 11 deletions

View File

@ -1,5 +1,5 @@
<script>
import { Select, Label, Checkbox } from "@budibase/bbui"
import { Select, Label } from "@budibase/bbui"
import { currentAsset, store } from "builderStore"
import { getActionProviderComponents } from "builderStore/dataBinding"
@ -21,10 +21,6 @@
getOptionValue={x => x._id}
/>
<div />
<Checkbox
text="Validate only current step"
bind:value={parameters.onlyCurrentStep}
/>
</div>
<style>

View File

@ -202,14 +202,11 @@
return fieldInfo
},
validate: (onlyCurrentStep = false) => {
validate: () => {
let valid = true
let validationFields = fields
// Reduce fields to only the current step if required
if (onlyCurrentStep) {
validationFields = fields.filter(f => get(f).step === get(currentStep))
}
validationFields = fields.filter(f => get(f).step === get(currentStep))
// Validate fields and check if any are invalid
validationFields.forEach(field => {

View File

@ -180,7 +180,6 @@ const validateFormHandler = async (action, context) => {
context,
action.parameters.componentId,
ActionTypes.ValidateForm,
action.parameters.onlyCurrentStep
)
}