Atomic Angular — Doc interne

Converter Select

The dropdown that lets a user pick which converted format previews a document, built from the app's configured converters and hidden entirely when only one applies.

<converter-select> renders only when previewMultiConversion is on and more than one configured converter matches the currently loaded preview's available conversions — otherwise the host hides itself entirely, so it can be dropped into a toolbar without leaving a gap when there is nothing to choose between.

Minimal example

<preview-content> already embeds this dropdown internally (through <preview-actions>) and owns the resulting conversion itself — reach for <converter-select> directly only when building a custom preview surface that does not use <preview-content>.

Standalone, next to a custom preview surface
custom-preview.component.ts
import { Component, signal } from "@angular/core";
import { ConverterSelectComponent } from "@sinequa/atomic-angular";
import type { CConverter } from "@sinequa/atomic-angular";
import type { PreviewData } from "@sinequa/atomic";

@Component({
  selector: "custom-preview",
  imports: [ConverterSelectComponent],
  template: `<converter-select [previewData]="previewData()" (onConversionSelect)="conversion.set($event)" />`,
})
export class CustomPreviewComponent {
  protected readonly previewData = signal<PreviewData | undefined>(undefined);
  protected readonly conversion = signal<CConverter | undefined>(undefined);
}

Defaults to the converter marked default in configuration, then the one marked primary, when several match.

Options

Prop

Type

onConversionSelect emits the selected CConverter, or undefined when none applies.

Pitfalls

What's next

On this page