Merge branch 'master' of github.com:Budibase/budibase into develop

This commit is contained in:
Martin McKeaveney 2022-09-01 13:37:56 +01:00
commit 502294555a
11 changed files with 21 additions and 22 deletions

View File

@ -59,8 +59,8 @@
} }
const handleChange = e => { const handleChange = e => {
fieldApi.setValue(e.detail) const changed = fieldApi.setValue(e.detail)
if (onChange) { if (onChange && changed) {
onChange({ value: e.detail }) onChange({ value: e.detail })
} }
} }

View File

@ -28,8 +28,8 @@
} }
const handleChange = e => { const handleChange = e => {
fieldApi.setValue(e.detail) const changed = fieldApi.setValue(e.detail)
if (onChange) { if (onChange && changed) {
onChange({ value: e.detail }) onChange({ value: e.detail })
} }
} }

View File

@ -18,8 +18,8 @@
let fieldApi let fieldApi
const handleChange = e => { const handleChange = e => {
fieldApi.setValue(e.detail) const changed = fieldApi.setValue(e.detail)
if (onChange) { if (onChange && changed) {
onChange({ value: e.detail }) onChange({ value: e.detail })
} }
} }

View File

@ -268,7 +268,7 @@
// Skip if the value is the same // Skip if the value is the same
if (!skipCheck && fieldState.value === value) { if (!skipCheck && fieldState.value === value) {
return return false
} }
// Update field state // Update field state

View File

@ -37,8 +37,8 @@
const handleChange = e => { const handleChange = e => {
const value = parseValue(e.detail) const value = parseValue(e.detail)
fieldApi.setValue(value) const changed = fieldApi.setValue(value)
if (onChange) { if (onChange && changed) {
onChange({ value }) onChange({ value })
} }
} }

View File

@ -47,8 +47,8 @@
} }
const handleChange = e => { const handleChange = e => {
fieldApi.setValue(e.detail) const changed = fieldApi.setValue(e.detail)
if (onChange) { if (onChange && changed) {
onChange({ value: e.detail }) onChange({ value: e.detail })
} }
} }

View File

@ -44,8 +44,8 @@
} }
const handleChange = e => { const handleChange = e => {
fieldApi.setValue(e.detail) const changed = fieldApi.setValue(e.detail)
if (onChange) { if (onChange && changed) {
onChange({ value: e.detail }) onChange({ value: e.detail })
} }
} }

View File

@ -34,8 +34,8 @@
) )
const handleChange = e => { const handleChange = e => {
fieldApi.setValue(e.detail) const changed = fieldApi.setValue(e.detail)
if (onChange) { if (onChange && changed) {
onChange({ value: e.detail }) onChange({ value: e.detail })
} }
} }

View File

@ -84,8 +84,8 @@
} }
const handleChange = value => { const handleChange = value => {
fieldApi.setValue(value) const changed = fieldApi.setValue(value)
if (onChange) { if (onChange && changed) {
onChange({ value }) onChange({ value })
} }
} }

View File

@ -90,8 +90,8 @@
} }
const handleChange = e => { const handleChange = e => {
fieldApi.setValue(e.detail) const changed = fieldApi.setValue(e.detail)
if (onChange) { if (onChange && changed) {
onChange({ value: e.detail }) onChange({ value: e.detail })
} }
} }

View File

@ -16,8 +16,8 @@
let fieldApi let fieldApi
const handleChange = e => { const handleChange = e => {
fieldApi.setValue(e.detail) const changed = fieldApi.setValue(e.detail)
if (onChange) { if (onChange && changed) {
onChange({ value: e.detail }) onChange({ value: e.detail })
} }
} }
@ -29,7 +29,6 @@
{disabled} {disabled}
{validation} {validation}
{defaultValue} {defaultValue}
{onChange}
type={type === "number" ? "number" : "string"} type={type === "number" ? "number" : "string"}
bind:fieldState bind:fieldState
bind:fieldApi bind:fieldApi