Skip to main content

IAutoscrollRendering interface

📖 Description​

Interface that specifies the block renderer interface. Used when creating custom blocks.

📃 Type declaration​

interface IAutoscrollRendering {
  required?: boolean;ReadonlyOptional
  hideRequiredIndicatorFromName?: boolean;ReadonlyOptional
  hideAriaDescription?: boolean;ReadonlyOptional
  hideButtons?: boolean;ReadonlyOptional
  autoSubmit?: boolean;ReadonlyOptional
  autoFocus?: boolean;ReadonlyOptional
  render?: (props: IAutoscrollRenderProps, done?: () => void, cancel?: () => void) => ReactNode;FunctionOptional
}
🖱ī¸ Hover with the mouse over a property name for a tooltip with the description of that property. Click it for more information.

🗃ī¸ Properties​


🏷ī¸ autoFocus​

Specifies if the block can gain focus automatically.

Type​

boolean


🏷ī¸ autoSubmit​

Specifies if the block can automatically submit.

Type​

boolean


🏷ī¸ hideAriaDescription​

Specifies if the default aria-describedby description should be invisible.

Type​

boolean


🏷ī¸ hideButtons​

Specifies if the block buttons should be invisible. This is useful for blocks that implement a question type that can automatically submit.

Type​

boolean


🏷ī¸ hideRequiredIndicatorFromName​

Specifies if the required asterisk (*) should be invisible. If this property is not specified or set to false, the required indicator is shown for required blocks.

Type​

boolean


🏷ī¸ required​

Specifies if the block is required.

Type​

boolean

â–ļī¸ Functions​


🔧 render​

Specifies a function that is invoked when the block needs to render. This function should return a valid React component.

Signature​

(props: IAutoscrollRenderProps, done?: () => void, cancel?: () => void) => ReactNode

Parameters​

NameTypeOptionalDescription
propsIAutoscrollRenderPropsNoContains the rendering props.
done() => voidYesInvoke this function when the block is done and the runner can move to the next block.
cancel() => voidYesInvoke this function when the block wants to cancel and go back to the previous block.

Return value​

Returns the ReactNode for the block.

tip

Read the Custom blocks guide for an example.