@hmiproject/helio-sdk
    Preparing search index...

    Type Alias RenderInstancesProps

    type RenderInstancesProps = {
        children?: (props: RenderInstancesRenderProps) => React.ReactNode;
        instances: InstanceRefListSchema;
        limit?: number;
        render?(options: RenderInstancesRenderOptions): ReactNode;
    }
    Index

    Properties

    Methods

    Properties

    children?: (props: RenderInstancesRenderProps) => React.ReactNode

    Can be used to customize rendering of the list entirely.

    Render instances including the total count of visible elements.

    function MyComponent(props) {
    return (
    <RenderInstances instances={props.children}>
    {(options) => (
    <Fragment>
    <div>{options.visibleInstances.length} Entries</div>

    <ul>
    {options.visibleInstances.map((item) => (
    <li>{item.render()}</li>
    ))}
    </ul>
    </Fragment>
    )}
    </RenderInstances>
    );
    }

    List of instances to render.

    Use Children to declare props that contain other instances.

    limit?: number

    Limit the maximum number of visible instances that should be rendered.

    Methods

    • Can be used to customize rendering of each instance.

      render will be called for each visible instance.

      Parameters

      • options: RenderInstancesRenderOptions

      Returns ReactNode

      Render instances as a <ul>.

      function MyComponent(props) {
      return (
      <ul>
      <RenderInstances
      instances={props.children}
      render={(options) => <li key={options.key}>{options.render()}</li>}
      />
      </ul>
      );
      }