TootList: accept id in props
This commit is contained in:
parent
dde0c249f4
commit
bdaaeadba6
1 changed files with 2 additions and 1 deletions
|
@ -18,6 +18,7 @@ import { findElementActionable } from "./RegularToot";
|
||||||
|
|
||||||
const TootList: Component<{
|
const TootList: Component<{
|
||||||
ref?: Ref<HTMLDivElement>;
|
ref?: Ref<HTMLDivElement>;
|
||||||
|
id?: string;
|
||||||
threads: readonly string[];
|
threads: readonly string[];
|
||||||
onUnknownThread: (id: string) => { value: mastodon.v1.Status }[] | undefined;
|
onUnknownThread: (id: string) => { value: mastodon.v1.Status }[] | undefined;
|
||||||
onChangeToot: (id: string, value: mastodon.v1.Status) => void;
|
onChangeToot: (id: string, value: mastodon.v1.Status) => void;
|
||||||
|
@ -149,7 +150,7 @@ const TootList: Component<{
|
||||||
return <p>Oops: {String(err)}</p>;
|
return <p>Oops: {String(err)}</p>;
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div ref={props.ref} class="toot-list">
|
<div ref={props.ref} id={props.id} class="toot-list">
|
||||||
<For each={props.threads}>
|
<For each={props.threads}>
|
||||||
{(itemId, index) => {
|
{(itemId, index) => {
|
||||||
const path = props.onUnknownThread(itemId)!;
|
const path = props.onUnknownThread(itemId)!;
|
||||||
|
|
Loading…
Reference in a new issue