Socket
Socket
Sign inDemoInstall

svelte-tiny-virtual-list

Package Overview
Dependencies
0
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.3 to 1.0.4

52

dist/svelte-tiny-virtual-list.js

@@ -859,4 +859,4 @@ (function (global, factory) {

let current;
const item_slot_template = /*#slots*/ ctx[19].item;
const item_slot = create_slot(item_slot_template, ctx, /*$$scope*/ ctx[18], get_item_slot_context);
const item_slot_template = /*#slots*/ ctx[18].item;
const item_slot = create_slot(item_slot_template, ctx, /*$$scope*/ ctx[17], get_item_slot_context);

@@ -882,4 +882,4 @@ return {

if (item_slot) {
if (item_slot.p && dirty[0] & /*$$scope, items*/ 262146) {
update_slot(item_slot, item_slot_template, ctx, /*$$scope*/ ctx[18], dirty, get_item_slot_changes, get_item_slot_context);
if (item_slot.p && dirty[0] & /*$$scope, items*/ 131074) {
update_slot(item_slot, item_slot_template, ctx, /*$$scope*/ ctx[17], dirty, get_item_slot_changes, get_item_slot_context);
}

@@ -912,4 +912,4 @@ }

let current;
const header_slot_template = /*#slots*/ ctx[19].header;
const header_slot = create_slot(header_slot_template, ctx, /*$$scope*/ ctx[18], get_header_slot_context);
const header_slot_template = /*#slots*/ ctx[18].header;
const header_slot = create_slot(header_slot_template, ctx, /*$$scope*/ ctx[17], get_header_slot_context);
let each_value = /*items*/ ctx[1];

@@ -924,4 +924,4 @@ const get_key = ctx => /*item*/ ctx[35].index;

const footer_slot_template = /*#slots*/ ctx[19].footer;
const footer_slot = create_slot(footer_slot_template, ctx, /*$$scope*/ ctx[18], get_footer_slot_context);
const footer_slot_template = /*#slots*/ ctx[18].footer;
const footer_slot = create_slot(footer_slot_template, ctx, /*$$scope*/ ctx[17], get_footer_slot_context);

@@ -966,3 +966,3 @@ return {

/*div1_binding*/ ctx[20](div1);
/*div1_binding*/ ctx[19](div1);
current = true;

@@ -972,8 +972,8 @@ },

if (header_slot) {
if (header_slot.p && dirty[0] & /*$$scope*/ 262144) {
update_slot(header_slot, header_slot_template, ctx, /*$$scope*/ ctx[18], dirty, get_header_slot_changes, get_header_slot_context);
if (header_slot.p && dirty[0] & /*$$scope*/ 131072) {
update_slot(header_slot, header_slot_template, ctx, /*$$scope*/ ctx[17], dirty, get_header_slot_changes, get_header_slot_context);
}
}
if (dirty[0] & /*$$scope, items*/ 262146) {
if (dirty[0] & /*$$scope, items*/ 131074) {
const each_value = /*items*/ ctx[1];

@@ -990,4 +990,4 @@ group_outros();

if (footer_slot) {
if (footer_slot.p && dirty[0] & /*$$scope*/ 262144) {
update_slot(footer_slot, footer_slot_template, ctx, /*$$scope*/ ctx[18], dirty, get_footer_slot_changes, get_footer_slot_context);
if (footer_slot.p && dirty[0] & /*$$scope*/ 131072) {
update_slot(footer_slot, footer_slot_template, ctx, /*$$scope*/ ctx[17], dirty, get_footer_slot_changes, get_footer_slot_context);
}

@@ -1030,3 +1030,3 @@ }

if (footer_slot) footer_slot.d(detaching);
/*div1_binding*/ ctx[20](null);
/*div1_binding*/ ctx[19](null);
}

@@ -1146,7 +1146,6 @@ };

recomputeSizes();
refresh();
}
if (prevProps.scrollOffset !== scrollOffset) {
$$invalidate(17, state = {
$$invalidate(16, state = {
offset: scrollOffset || 0,

@@ -1156,3 +1155,3 @@ scrollChangeReason: SCROLL_CHANGE_REASON.REQUESTED

} else if (typeof scrollToIndex === "number" && (scrollPropsHaveChanged || itemPropsHaveChanged)) {
$$invalidate(17, state = {
$$invalidate(16, state = {
offset: getOffsetForIndex(scrollToIndex, scrollToAlignment, itemCount),

@@ -1231,2 +1230,3 @@ scrollChangeReason: SCROLL_CHANGE_REASON.REQUESTED

sizeAndPositionManager.resetItem(startIndex);
refresh();
}

@@ -1251,3 +1251,3 @@

$$invalidate(17, state = {
$$invalidate(16, state = {
offset,

@@ -1297,3 +1297,3 @@ scrollChangeReason: SCROLL_CHANGE_REASON.OBSERVED

if ("overscanCount" in $$props) $$invalidate(14, overscanCount = $$props.overscanCount);
if ("$$scope" in $$props) $$invalidate(18, $$scope = $$props.$$scope);
if ("$$scope" in $$props) $$invalidate(17, $$scope = $$props.$$scope);
};

@@ -1306,3 +1306,3 @@

if ($$self.$$.dirty[0] & /*state*/ 131072) {
if ($$self.$$.dirty[0] & /*state*/ 65536) {
stateUpdated();

@@ -1328,3 +1328,2 @@ }

overscanCount,
refresh,
recomputeSizes,

@@ -1361,4 +1360,3 @@ state,

overscanCount: 14,
refresh: 15,
recomputeSizes: 16
recomputeSizes: 15
},

@@ -1369,9 +1367,5 @@ [-1, -1]

get refresh() {
get recomputeSizes() {
return this.$$.ctx[15];
}
get recomputeSizes() {
return this.$$.ctx[16];
}
}

@@ -1378,0 +1372,0 @@

{
"name": "svelte-tiny-virtual-list",
"version": "1.0.3",
"version": "1.0.4",
"description": "A tiny but mighty list virtualization component for svelte, with zero dependencies 💪",

@@ -5,0 +5,0 @@ "svelte": "src/index.js",

@@ -164,3 +164,2 @@ <p align="center"><img src="https://raw.githubusercontent.com/Skayo/svelte-tiny-virtual-list/master/assets/ListLogo.svg" alt="ListLogo" width="225"></p>

- `recomputeSizes(startIndex: number)` - This method force recomputes the item sizes after the specified index (these are normally cached).
- `refresh()` - This method refreshes the currently visible items.

@@ -180,10 +179,9 @@ `VirtualList` has no way of knowing when its underlying data has changed, since it only receives a itemSize property. If the itemSize is a `number`, this isn't an issue, as it can compare before and after values and automatically call `recomputeSizes` internally.

let virtualList;
let recomputeSizes;
onMount(() => {
recomputeSizes = virtualList.recomputeSizes;
})
function handleClick() {
virtualList.recomputeSizes(0);
}
</script>
<button on:click={() => recomputeSizes(4)}>Recompute Sizes</button>
<button on:click={handleClick}>Recompute Sizes</button>

@@ -190,0 +188,0 @@ <VirtualList

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc