1
0
Fork 0
mirror of synced 2024-07-06 23:10:57 +12:00
budibase/packages/standard-components/src/List.svelte

24 lines
464 B
Svelte

<script>
import { onMount } from "svelte"
import fetchData from "./fetchData.js"
import { isEmpty } from "lodash/fp"
export let _bb
export let datasource = []
let target
let store = _bb.store
onMount(async () => {
if (!isEmpty(datasource)) {
const data = await fetchData(datasource, $store)
_bb.attachChildren(target, {
hydrate: false,
context: data,
})
}
})
</script>
<section bind:this={target} />