Browse Source
Merge pull request #743 from Budibase/bug/minor-fixes
Minor fixes - Chuckles
pull/751/head
Martin McKeaveney
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
12 additions and
0 deletions
-
packages/builder/src/components/backend/DataTable/ViewDataTable.svelte
-
packages/builder/src/components/userInterface/propertyCategories.js
|
|
|
@ -1,5 +1,6 @@ |
|
|
|
<script> |
|
|
|
import api from "builderStore/api" |
|
|
|
import { backendUiStore } from "builderStore" |
|
|
|
import Table from "./Table.svelte" |
|
|
|
import CalculateButton from "./buttons/CalculateButton.svelte" |
|
|
|
import GroupByButton from "./buttons/GroupByButton.svelte" |
|
|
|
@ -22,6 +23,15 @@ |
|
|
|
} |
|
|
|
|
|
|
|
async function fetchViewData(name, field, groupBy, calculation) { |
|
|
|
const tables = $backendUiStore.tables |
|
|
|
const allTableViews = tables.map(table => table.views) |
|
|
|
const thisView = allTableViews.filter( |
|
|
|
views => views != null && views[name] != null |
|
|
|
)[0] |
|
|
|
// don't fetch view data if the view no longer exists |
|
|
|
if (!thisView) { |
|
|
|
return |
|
|
|
} |
|
|
|
const params = new URLSearchParams() |
|
|
|
if (calculation) { |
|
|
|
params.set("field", field) |
|
|
|
|
|
|
|
@ -139,6 +139,8 @@ export const margin = [ |
|
|
|
{ label: "32px", value: "32px" }, |
|
|
|
{ label: "48px", value: "48px" }, |
|
|
|
{ label: "64px", value: "64px" }, |
|
|
|
{ label: "128px", value: "128px" }, |
|
|
|
{ label: "256px", value: "256px" }, |
|
|
|
{ label: "Auto", value: "auto" }, |
|
|
|
{ label: "100%", value: "100%" }, |
|
|
|
], |
|
|
|
|