1
0
Fork 0
mirror of synced 2024-06-27 02:20:35 +12:00

Fix settings to select fields and fix chart settings not showing fields

This commit is contained in:
Andrew Kingston 2021-01-26 10:57:57 +00:00
parent 47cdda8a5f
commit 9e29b33055
3 changed files with 2 additions and 5 deletions

View file

@ -46,7 +46,7 @@ export const getDatasourceForProvider = component => {
// Extract datasource from component instance // Extract datasource from component instance
const datasourceSetting = def.settings.find(setting => { const datasourceSetting = def.settings.find(setting => {
return setting.key === def.datasourceSetting return setting.type === "datasource" || setting.type === "table"
}) })
if (!datasourceSetting) { if (!datasourceSetting) {
return null return null

View file

@ -12,7 +12,7 @@
export let multiselect = false export let multiselect = false
$: datasource = getDatasourceForProvider(componentInstance) $: datasource = getDatasourceForProvider(componentInstance)
$: schema = getSchemaForDatasource(datasource) $: schema = getSchemaForDatasource(datasource).schema
$: options = Object.keys(schema || {}) $: options = Object.keys(schema || {})
</script> </script>

View file

@ -106,7 +106,6 @@
"styleable": true, "styleable": true,
"hasChildren": true, "hasChildren": true,
"dataProvider": true, "dataProvider": true,
"datasourceSetting": "datasource",
"settings": [ "settings": [
{ {
"type": "datasource", "type": "datasource",
@ -418,7 +417,6 @@
"styleable": true, "styleable": true,
"hasChildren": true, "hasChildren": true,
"dataProvider": true, "dataProvider": true,
"datasourceSetting": "table",
"settings": [ "settings": [
{ {
"type": "table", "type": "table",
@ -434,7 +432,6 @@
"hasChildren": true, "hasChildren": true,
"styleable": true, "styleable": true,
"dataProvider": true, "dataProvider": true,
"datasourceSetting": "table",
"settings": [ "settings": [
{ {
"type": "table", "type": "table",