Remove initial work on pagination standard component
This commit is contained in:
parent
c1b6f26f28
commit
25fdb30e34
|
@ -1521,18 +1521,5 @@
|
||||||
"context": {
|
"context": {
|
||||||
"type": "schema"
|
"type": "schema"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"pagination": {
|
|
||||||
"name": "Pagination Control",
|
|
||||||
"icon": "",
|
|
||||||
"styleable": true,
|
|
||||||
"hasChildren": "false",
|
|
||||||
"settings": [
|
|
||||||
{
|
|
||||||
"type": "dataProvider",
|
|
||||||
"label": "Provider",
|
|
||||||
"key": "dataProviderId"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,25 +0,0 @@
|
||||||
<script>
|
|
||||||
import { getContext } from "svelte"
|
|
||||||
|
|
||||||
export let dataProviderId
|
|
||||||
|
|
||||||
const component = getContext("component")
|
|
||||||
const { styleable, ActionTypes, builderStore } = getContext("sdk")
|
|
||||||
const dataContext = getContext("context")
|
|
||||||
|
|
||||||
$: dataProviderContext = dataContext?.[dataProviderId]
|
|
||||||
$: pageNumber = dataProviderContext?.pageNumber ?? 1
|
|
||||||
$: hasPrevPage = dataProviderContext?.hasPrevPage ?? false
|
|
||||||
$: hasNextPage = dataProviderContext?.hasNextPage ?? false
|
|
||||||
$: prevPage = dataContext?.[`${dataProviderId}_${ActionTypes.PrevPage}`]
|
|
||||||
$: nextPage = dataContext?.[`${dataProviderId}_${ActionTypes.NextPage}`]
|
|
||||||
$: hasValidContext = dataProviderContext != null && nextPage != null
|
|
||||||
</script>
|
|
||||||
|
|
||||||
{#if hasValidContext}
|
|
||||||
<div>
|
|
||||||
Page {pageNumber}
|
|
||||||
</div>
|
|
||||||
{:else if builderStore.inBuilder}
|
|
||||||
<div>Choose a data provider to control with this pagination component.</div>
|
|
||||||
{/if}
|
|
Loading…
Reference in New Issue