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<{
 | 
			
		||||
  ref?: Ref<HTMLDivElement>;
 | 
			
		||||
  id?: string;
 | 
			
		||||
  threads: readonly string[];
 | 
			
		||||
  onUnknownThread: (id: string) => { value: mastodon.v1.Status }[] | undefined;
 | 
			
		||||
  onChangeToot: (id: string, value: mastodon.v1.Status) => void;
 | 
			
		||||
| 
						 | 
				
			
			@ -149,7 +150,7 @@ const TootList: Component<{
 | 
			
		|||
        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}>
 | 
			
		||||
          {(itemId, index) => {
 | 
			
		||||
            const path = props.onUnknownThread(itemId)!;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue