Remove checkbox. Always validate current step.
This commit is contained in:
parent
5d8efe40eb
commit
40ef719f2f
|
@ -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>
|
||||
|
|
|
@ -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 => {
|
||||
|
|
|
@ -180,7 +180,6 @@ const validateFormHandler = async (action, context) => {
|
|||
context,
|
||||
action.parameters.componentId,
|
||||
ActionTypes.ValidateForm,
|
||||
action.parameters.onlyCurrentStep
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue