
Security News
GitHub Actions Adds cache-mode to Limit Cache Poisoning Risk
GitHub Actions now supports cache-mode, a least-privilege control on the Actions cache aimed at the cache poisoning technique behind recent compromises.
@isoftdata/svelte-load-item-modal
Advanced tools

pnpm i @isoftdata/svelte-load-item-modal
show prop (use open() function instead)itemTitle prop. Pass title, inputPlaceholder, & noResultsText props instead if you want to customize those strings.| Name | Type | Description | Default Value |
|---|---|---|---|
| allowEmptySearch | boolean | Whether to allow searching without a search string. | false |
| 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 | '' |
| title | string | undefined | The title to use instead of the default. Useful if you want to translate this component. | 'Find Items' |
| inputPlaceholder | string | undefined | The input placeholder to use instead of the default. Useful if you want to translate this component. | title ?? 'Find Items' |
| noResultsText | string | undefined | The text to show when there are no results instead of the default. Useful if you want to translate this component. | 'No Matching Items Found' |
| inputProps | Omit<ComponentProps<typeof Input<string>>, 'value' | 'input' | 'isLoading' | 'placeholder' | 'size' | 'showLabel' | 'isLoading'> | Props to be passed to the input component | {} |
item and index are available on this slotNote: All Input component snippets(other than
append) are available via theinputPropsprop.
{ item: T; index: number }.doSearch throws an error with an Error class instance.Promise<Array<T>> (required).open(searchInput?: string) => void - Opens the modal. If a search string is provided, it will perform a search with that string.<script lang="ts">
import LoadItemModal from '@isoftdata/svelte-load-item-modal'
let loadItemModal: LoadItemModal<{id: number, name: string}> | undefined
function doSearch() {
loadItemModal?.open()
}
</script>
<LoadItemModal
itemDisplayProp="name"
itemIdProp="id"
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())),
)
}}
chooseItem={({ item, index }) => {
console.log('Item chosen:', item, index)
}}
onLookupError={error => {
console.error('Lookup error:', error)
}}
cancel={() => {
console.log('Cancel')
}}
>
{#snippet children({ item, index })}
{index + 1} - {item.name}
{/snippet}
</LoadItemModal>
FAQs
Unknown package
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
GitHub Actions now supports cache-mode, a least-privilege control on the Actions cache aimed at the cache poisoning technique behind recent compromises.

Company News
Allow myself to introduce... myself.

Research
/Security News
A Twitch browser extension on Chrome and Firefox forwards users’ live OAuth session tokens through proxies controlled by a Russian bot service.