1
0
Fork 0
mirror of synced 2024-08-12 16:41:26 +12:00

Remove checkbox. Always validate current step.

This commit is contained in:
Mel O'Hagan 2022-07-20 09:56:02 +01:00
parent 2f317dfe73
commit 5a3688d237
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
)
}