PR Feedback
This commit is contained in:
parent
14ae38982e
commit
4fd9d2262e
|
@ -9,7 +9,7 @@
|
|||
} from "builderStore/dataBinding"
|
||||
import { currentAsset } from "builderStore"
|
||||
import DraggableList from "../DraggableList/DraggableList.svelte"
|
||||
import { createEventDispatcher, getContext } from "svelte"
|
||||
import { createEventDispatcher } from "svelte"
|
||||
import { store, selectedScreen } from "builderStore"
|
||||
import FieldSetting from "./FieldSetting.svelte"
|
||||
import { convertOldFieldFormat, getComponentForField } from "./utils"
|
||||
|
@ -17,8 +17,6 @@
|
|||
export let componentInstance
|
||||
export let value
|
||||
|
||||
const updates = getContext("settings")
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
let sanitisedFields
|
||||
let fieldList
|
||||
|
@ -29,7 +27,6 @@
|
|||
let unconfigured
|
||||
|
||||
let selectAll = true
|
||||
let updating = false
|
||||
|
||||
$: bindings = getBindableProperties($selectedScreen, componentInstance._id)
|
||||
$: actionType = componentInstance.actionType
|
||||
|
@ -49,10 +46,6 @@
|
|||
cachedValue = cloneDeep(value)
|
||||
}
|
||||
|
||||
$: if (typeof $updates.resp == "string") {
|
||||
updating = false
|
||||
}
|
||||
|
||||
const updateState = value => {
|
||||
schema = getSchema($currentAsset, datasource)
|
||||
options = Object.keys(schema || {})
|
||||
|
@ -161,7 +154,6 @@
|
|||
}
|
||||
|
||||
const toggleAll = update => {
|
||||
updating = true
|
||||
listUpdated(update)
|
||||
}
|
||||
</script>
|
||||
|
@ -180,7 +172,6 @@
|
|||
text=""
|
||||
bind:value={selectAll}
|
||||
thin
|
||||
disabled={updating}
|
||||
/>
|
||||
</div>
|
||||
{#if fieldList?.length}
|
||||
|
@ -193,9 +184,7 @@
|
|||
listTypeProps={{
|
||||
componentBindings,
|
||||
bindings,
|
||||
updating,
|
||||
}}
|
||||
draggable={!updating}
|
||||
/>
|
||||
{/if}
|
||||
</div>
|
||||
|
|
|
@ -8,8 +8,6 @@
|
|||
import { getComponentForSetting } from "components/design/settings/componentSettings"
|
||||
import InfoDisplay from "./InfoDisplay.svelte"
|
||||
import analytics, { Events } from "analytics"
|
||||
import { setContext } from "svelte"
|
||||
import { writable } from "svelte/store"
|
||||
|
||||
export let componentDefinition
|
||||
export let componentInstance
|
||||
|
@ -21,21 +19,6 @@
|
|||
export let includeHidden = false
|
||||
export let tag
|
||||
|
||||
let status = writable({
|
||||
status: null,
|
||||
lastUpdate: null,
|
||||
})
|
||||
|
||||
const updateStatus = resp => {
|
||||
status.update(state => ({
|
||||
...state,
|
||||
resp,
|
||||
lastUpdate: new Date().getTime(),
|
||||
}))
|
||||
}
|
||||
|
||||
setContext("settings", status)
|
||||
|
||||
$: sections = getSections(
|
||||
componentInstance,
|
||||
componentDefinition,
|
||||
|
@ -93,7 +76,6 @@
|
|||
} else {
|
||||
await store.actions.components.updateSetting(setting.key, value)
|
||||
}
|
||||
updateStatus("success")
|
||||
// Send event if required
|
||||
if (setting.sendEvents) {
|
||||
analytics.captureEvent(Events.COMPONENT_UPDATED, {
|
||||
|
@ -103,7 +85,6 @@
|
|||
})
|
||||
}
|
||||
} catch (error) {
|
||||
updateStatus("failed")
|
||||
notifications.error("Error updating component prop")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue