
Security News
Happy Birthday, Shai-Hulud
It has been one year since Shai-Hulud made its first appearance on npm.
@isoftdata/svelte-load-item-modal
Advanced tools
npm i @isoftdata/svelte-load-item-modal
| Name | Type | Description | Default Value |
|---|---|---|---|
| itemTitle | string | The title of the item. Shown in the header and input placeholder. | 'Item' |
| itemIdProp | keyof T | The property name for the item ID. Used for the default slot's default content | Required |
| itemDisplayProp | keyof T | The property name for the item display. Used for the default slot's default content | Required |
| modalSize | ComponentProps<Modal>['modalSize'] | The size of the modal | '' |
| doSearch | (searchString: string) => Promise<Array<T>> | The search function | Required |
item and index are available on this slotdetail is { item: T; index: number }doSearch throws an error. detail is {error: Error}detail is void<script lang="ts">
import LoadItemModal from '@isoftdata/svelte-load-item-modal'
let loadItemModal: LoadItemModal<{id: number, name: string}> | undefined
function doSearch() {
loadItemModal?.show()
}
</script>
<LoadItemModal
itemDisplayProp="name"
itemIdProp="id"
itemTitle="Fruit"
bind:this={loadItemModal}
doSearch={searchString => {
return Promise.resolve(
[
{ id: 1, name: 'Apple' },
{ id: 2, name: 'Banana' },
{ id: 3, name: 'Watermelon' },
{ id: 4, name: 'Pineapple' },
{ id: 5, name: 'Mango' },
{ id: 6, name: 'Strawberry' },
{ id: 7, name: 'Blueberry' },
{ id: 8, name: 'Raspberry' },
{ id: 9, name: 'Blackberry' },
{ id: 10, name: 'Kiwi' },
].filter(item => item.name.toLowerCase().includes(searchString.toLowerCase())),
)
}}
on:chooseItem={event => {
console.log('Item chosen:', event.detail)
}}
on:onLookupError={event => {
console.error('Lookup error:', event.detail)
}}
on:cancel={() => {
console.log('Cancel')
}}
let:item
>{item.name}</LoadItemModal>
FAQs
Unknown package
The npm package @isoftdata/svelte-load-item-modal receives a total of 51 weekly downloads. As such, @isoftdata/svelte-load-item-modal popularity was classified as not popular.
We found that @isoftdata/svelte-load-item-modal demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 13 open source maintainers collaborating on the project.

Security News
It has been one year since Shai-Hulud made its first appearance on npm.

Research
/Security News
Operators behind PolinRider used a compromised GitHub account to plant malware in four development versions of a Packagist package with 700,000+ downloads.

Security News
GitHub Actions now supports cache-mode, a least-privilege control on the Actions cache aimed at the cache poisoning technique behind recent compromises.