Fix issues with fetching features and bindings in custom datasources
This commit is contained in:
parent
9667c954ef
commit
5990f43f3f
|
@ -1,5 +1,9 @@
|
|||
<script>
|
||||
import { getContextProviderComponents } from "builderStore/dataBinding"
|
||||
import {
|
||||
getContextProviderComponents,
|
||||
readableToRuntimeBinding,
|
||||
runtimeToReadableBinding,
|
||||
} from "builderStore/dataBinding"
|
||||
import {
|
||||
Button,
|
||||
Popover,
|
||||
|
@ -167,7 +171,7 @@
|
|||
}
|
||||
|
||||
const openCustomDrawer = () => {
|
||||
tmpCustomData = value.data || ""
|
||||
tmpCustomData = runtimeToReadableBinding(bindings, value.data || "")
|
||||
drawer.show()
|
||||
}
|
||||
|
||||
|
@ -186,7 +190,7 @@
|
|||
const saveCustomData = () => {
|
||||
handleSelected({
|
||||
...value,
|
||||
data: tmpCustomData,
|
||||
data: readableToRuntimeBinding(bindings, tmpCustomData),
|
||||
})
|
||||
drawer.hide()
|
||||
}
|
||||
|
@ -204,7 +208,6 @@
|
|||
tmpCustomData = JSON.stringify(js)
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
notifications.error("Failed to parse CSV")
|
||||
}
|
||||
modal.hide()
|
||||
|
@ -376,7 +379,7 @@
|
|||
</Popover>
|
||||
|
||||
<Modal bind:this={modal}>
|
||||
<ModalContent title="Choose a CSV">
|
||||
<ModalContent title="Load CSV" showConfirmButton={false}>
|
||||
<CoreDropzone compact extensions=".csv" on:change={handleCSV} />
|
||||
</ModalContent>
|
||||
</Modal>
|
||||
|
|
|
@ -49,7 +49,7 @@ export const createActions = context => {
|
|||
}
|
||||
|
||||
const getFeatures = () => {
|
||||
return new TableFetch(null).determineFeatureFlags()
|
||||
return new TableFetch({ API }).determineFeatureFlags()
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
|
@ -49,7 +49,7 @@ export const createActions = context => {
|
|||
}
|
||||
|
||||
const getFeatures = () => {
|
||||
return new ViewV2Fetch(null).determineFeatureFlags()
|
||||
return new ViewV2Fetch({ API }).determineFeatureFlags()
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
|
@ -112,7 +112,7 @@ export const createActions = context => {
|
|||
|
||||
// Determine how many rows to fetch per page
|
||||
const features = datasource.actions.getFeatures()
|
||||
const limit = features?.supportsPagination ? RowPageSize : 100000
|
||||
const limit = features?.supportsPagination ? RowPageSize : null
|
||||
|
||||
// Create new fetch model
|
||||
const newFetch = fetchData({
|
||||
|
|
Loading…
Reference in New Issue