PR comments.
This commit is contained in:
parent
b6498c9082
commit
03461c2a88
|
@ -25,7 +25,7 @@
|
||||||
export let filter: SearchFilter[]
|
export let filter: SearchFilter[]
|
||||||
// not really obvious how to type this - some components pass other things here
|
// not really obvious how to type this - some components pass other things here
|
||||||
// but it looks like the component data fetch should only work with tables
|
// but it looks like the component data fetch should only work with tables
|
||||||
export let datasourceType: "table" = "table"
|
export let datasourceType: "table" | "user" | "groupUser" = "table"
|
||||||
export let primaryDisplay: string | undefined = undefined
|
export let primaryDisplay: string | undefined = undefined
|
||||||
export let span: number | undefined = undefined
|
export let span: number | undefined = undefined
|
||||||
export let helpText: string | undefined = undefined
|
export let helpText: string | undefined = undefined
|
||||||
|
@ -55,7 +55,9 @@
|
||||||
$: fetch = fetchData({
|
$: fetch = fetchData({
|
||||||
API,
|
API,
|
||||||
datasource: {
|
datasource: {
|
||||||
type: datasourceType,
|
// typing here doesn't seem correct - we have the correct datasourceType options
|
||||||
|
// but when we configure the fetchData, it seems to think only "table" is valid
|
||||||
|
type: datasourceType as any,
|
||||||
tableId: linkedTableId,
|
tableId: linkedTableId,
|
||||||
},
|
},
|
||||||
options: {
|
options: {
|
||||||
|
@ -257,10 +259,6 @@
|
||||||
fetch.nextPage()
|
fetch.nextPage()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const componentValue = () => {
|
|
||||||
return selectedValue as any
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Field
|
<Field
|
||||||
|
@ -282,7 +280,7 @@
|
||||||
this={component}
|
this={component}
|
||||||
options={enrichedOptions}
|
options={enrichedOptions}
|
||||||
{autocomplete}
|
{autocomplete}
|
||||||
value={componentValue()}
|
value={castSelectedValue}
|
||||||
on:change={handleChange}
|
on:change={handleChange}
|
||||||
on:loadMore={loadMore}
|
on:loadMore={loadMore}
|
||||||
id={fieldState.fieldId}
|
id={fieldState.fieldId}
|
||||||
|
|
Loading…
Reference in New Issue