@cas-smartdesign/virtual-list 7.0.1 → 7.0.2
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/dist/docs/1_selection_types.js +1 -2
- package/dist/docs/doc.mjs +2 -2
- package/package.json +1 -1
- package/readme.md +1 -1
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import"./doc.mjs";import{I as
|
|
2
|
-
Modifier pressed: ${e.detail.hasModifier}`})});
|
|
1
|
+
import"./doc.mjs";import{I as l}from"./item-provider.mjs";const r=document.querySelector("#selection-example"),t=r.querySelector("#notification"),n=Array.from(r.querySelectorAll("sd-virtual-list"));n.forEach(i=>{new l().connectList(i),i.addEventListener("selection",e=>{const o=n.indexOf(e.currentTarget);t.style.visibility="visible",t.style.gridColumnStart=`${o+1}`,t.innerText=`Item at index ${e.detail.index} has been ${e.detail.selected?"selected":"deselected"}`})});
|
package/dist/docs/doc.mjs
CHANGED
|
@@ -55,7 +55,7 @@ lists.forEach((list: VirtualList) => {
|
|
|
55
55
|
notification.style.gridColumnStart = \`\${listIndex + 1}\`;
|
|
56
56
|
notification.innerText = \`Item at index \${event.detail.index} has been \${
|
|
57
57
|
event.detail.selected ? "selected" : "deselected"
|
|
58
|
-
}
|
|
58
|
+
}\`;
|
|
59
59
|
});
|
|
60
60
|
});
|
|
61
61
|
`,gi=`import { ItemData } from "@cas-smartdesign/list-item";
|
|
@@ -496,7 +496,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),ie=S,V=T),q===void 0&&
|
|
|
496
496
|
<li><code>selection</code><ul>
|
|
497
497
|
<li>Dispatched when one of the items is selected/deselected</li>
|
|
498
498
|
<li>Contains the index of the item and a <code>selected</code> flag which is when false indicates that the item is deselected</li>
|
|
499
|
-
<li>The <code>
|
|
499
|
+
<li>The <code>originalEvent</code> a mouse or keyboard event that triggered the selection event.</li>
|
|
500
500
|
</ul>
|
|
501
501
|
</li>
|
|
502
502
|
</ul>
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -43,7 +43,7 @@ The following properties are available:
|
|
|
43
43
|
- `selection`
|
|
44
44
|
- Dispatched when one of the items is selected/deselected
|
|
45
45
|
- Contains the index of the item and a `selected` flag which is when false indicates that the item is deselected
|
|
46
|
-
- The `
|
|
46
|
+
- The `originalEvent` a mouse or keyboard event that triggered the selection event.
|
|
47
47
|
|
|
48
48
|
## Public methods
|
|
49
49
|
|