@ims360/svelte-ivory 0.1.0 → 0.1.1

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/README.md CHANGED
@@ -9,7 +9,7 @@ Eventually we will add more documentation and examples to make it easier for dev
9
9
  Include this line in your `app.css` file, so the TW classes used in the lib are included:
10
10
 
11
11
  ```css
12
- @source "../node_modules/@ims360/svelte-ivory";
12
+ @source '../node_modules/@ims360/svelte-ivory';
13
13
  ```
14
14
 
15
15
  _You may need to adjust the path if your `app.css` is not located in `/src`_
@@ -48,7 +48,7 @@
48
48
  <div
49
49
  class={['group flex shrink-0 flex-row justify-start']}
50
50
  bind:this={target}
51
- style="width: {column.width}px;"
51
+ style="width: {column?.width ?? 0}px;"
52
52
  >
53
53
  {@render children?.()}
54
54
  {#if column.resizable}
@@ -191,11 +191,11 @@
191
191
 
192
192
  <VirtualList
193
193
  bind:this={list}
194
+ bind:b_scrollTop
194
195
  data={results.entries}
195
196
  class={twMerge(clsx(['flex flex-col overflow-hidden border-transparent', clazz]))}
196
- bind:b_scrollTop
197
- {rowHeight}
198
197
  rowClass={['pl-2 pr-4', rowClass]}
198
+ {rowHeight}
199
199
  >
200
200
  {#snippet header()}
201
201
  <div
@@ -206,7 +206,7 @@
206
206
  )
207
207
  )}
208
208
  >
209
- {#if treeIndicatorColumn}
209
+ {#if treeIndicatorColumn instanceof ColumnController}
210
210
  <ColumnHead column={treeIndicatorColumn}></ColumnHead>
211
211
  {/if}
212
212
  {#each externalColumns || columns as column (column.id)}
@@ -24,7 +24,7 @@ export class ColumnController {
24
24
  this.minimalWidth = (conf.width ?? DEFAULT_WIDTH) * MINIMAL_WIDTH_MULTIPLIER;
25
25
  }
26
26
  if (this.width === undefined) {
27
- const newWidth = conf.width ?? DEFAULT_WIDTH;
27
+ const newWidth = typeof conf.width === 'undefined' ? DEFAULT_WIDTH : conf.width;
28
28
  this.width = newWidth;
29
29
  }
30
30
  if (!this.header)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ims360/svelte-ivory",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "keywords": [
5
5
  "svelte"
6
6
  ],
@@ -48,7 +48,7 @@
48
48
  <div
49
49
  class={['group flex shrink-0 flex-row justify-start']}
50
50
  bind:this={target}
51
- style="width: {column.width}px;"
51
+ style="width: {column?.width ?? 0}px;"
52
52
  >
53
53
  {@render children?.()}
54
54
  {#if column.resizable}
@@ -191,11 +191,11 @@
191
191
 
192
192
  <VirtualList
193
193
  bind:this={list}
194
+ bind:b_scrollTop
194
195
  data={results.entries}
195
196
  class={twMerge(clsx(['flex flex-col overflow-hidden border-transparent', clazz]))}
196
- bind:b_scrollTop
197
- {rowHeight}
198
197
  rowClass={['pl-2 pr-4', rowClass]}
198
+ {rowHeight}
199
199
  >
200
200
  {#snippet header()}
201
201
  <div
@@ -206,7 +206,7 @@
206
206
  )
207
207
  )}
208
208
  >
209
- {#if treeIndicatorColumn}
209
+ {#if treeIndicatorColumn instanceof ColumnController}
210
210
  <ColumnHead column={treeIndicatorColumn}></ColumnHead>
211
211
  {/if}
212
212
  {#each externalColumns || columns as column (column.id)}
@@ -38,7 +38,7 @@ export class ColumnController {
38
38
  this.minimalWidth = (conf.width ?? DEFAULT_WIDTH) * MINIMAL_WIDTH_MULTIPLIER;
39
39
  }
40
40
  if (this.width === undefined) {
41
- const newWidth = conf.width ?? DEFAULT_WIDTH;
41
+ const newWidth = typeof conf.width === 'undefined' ? DEFAULT_WIDTH : conf.width;
42
42
  this.width = newWidth;
43
43
  }
44
44
  if (!this.header) this.header = conf.header;