@budibase/bbui 1.0.98-alpha.1 → 1.0.98

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@budibase/bbui",
3
3
  "description": "A UI solution used in the different Budibase projects.",
4
- "version": "1.0.98-alpha.1",
4
+ "version": "1.0.98",
5
5
  "license": "MPL-2.0",
6
6
  "svelte": "src/index.js",
7
7
  "module": "dist/bbui.es.js",
@@ -38,7 +38,7 @@
38
38
  ],
39
39
  "dependencies": {
40
40
  "@adobe/spectrum-css-workflow-icons": "^1.2.1",
41
- "@budibase/string-templates": "^1.0.98-alpha.1",
41
+ "@budibase/string-templates": "^1.0.98",
42
42
  "@spectrum-css/actionbutton": "^1.0.1",
43
43
  "@spectrum-css/actiongroup": "^1.0.1",
44
44
  "@spectrum-css/avatar": "^3.0.2",
@@ -84,5 +84,5 @@
84
84
  "svelte-flatpickr": "^3.2.3",
85
85
  "svelte-portal": "^1.0.0"
86
86
  },
87
- "gitHead": "b08461e611911f91162f643132406603646b1bde"
87
+ "gitHead": "c13a6db9c74b50786732c52d2827e018a3542047"
88
88
  }
@@ -56,7 +56,6 @@
56
56
  $: if (!loading) loaded = true
57
57
  $: fields = getFields(schema, showAutoColumns, autoSortColumns)
58
58
  $: rows = fields?.length ? data || [] : []
59
- $: totalRowCount = rows?.length || 0
60
59
  $: visibleRowCount = getVisibleRowCount(
61
60
  loaded,
62
61
  height,
@@ -64,12 +63,7 @@
64
63
  rowCount,
65
64
  rowHeight
66
65
  )
67
- $: heightStyle = getHeightStyle(
68
- visibleRowCount,
69
- rowCount,
70
- totalRowCount,
71
- rowHeight
72
- )
66
+ $: contentStyle = getContentStyle(visibleRowCount, rowCount, rowHeight)
73
67
  $: sortedRows = sortRows(rows, sortColumn, sortOrder)
74
68
  $: gridStyle = getGridStyle(fields, schema, showEditColumn)
75
69
  $: showEditColumn = allowEditRows || allowSelectRows
@@ -113,16 +107,11 @@
113
107
  return Math.min(allRows, Math.ceil(height / rowHeight))
114
108
  }
115
109
 
116
- const getHeightStyle = (
117
- visibleRowCount,
118
- rowCount,
119
- totalRowCount,
120
- rowHeight
121
- ) => {
122
- if (!rowCount || !visibleRowCount || totalRowCount <= rowCount) {
110
+ const getContentStyle = (visibleRows, rowCount, rowHeight) => {
111
+ if (!rowCount || !visibleRows) {
123
112
  return ""
124
113
  }
125
- return `height: ${headerHeight + visibleRowCount * rowHeight}px;`
114
+ return `height: ${headerHeight + visibleRows * rowHeight}px;`
126
115
  }
127
116
 
128
117
  const getGridStyle = (fields, schema, showEditColumn) => {
@@ -275,11 +264,11 @@
275
264
  style={`--row-height: ${rowHeight}px; --header-height: ${headerHeight}px;`}
276
265
  >
277
266
  {#if !loaded}
278
- <div class="loading" style={heightStyle}>
267
+ <div class="loading" style={contentStyle}>
279
268
  <ProgressCircle />
280
269
  </div>
281
270
  {:else}
282
- <div class="spectrum-Table" style={`${heightStyle}${gridStyle}`}>
271
+ <div class="spectrum-Table" style={`${contentStyle}${gridStyle}`}>
283
272
  {#if fields.length}
284
273
  <div class="spectrum-Table-head">
285
274
  {#if showEditColumn}