schema-components - v3.7.0
    Preparing search index...

    Function discriminatedUnionValueForTab

    • Pure helper: convert a tab index into the new value the discriminated union should emit. Returns undefined when the index is out of bounds.

      Extracted from DiscriminatedUnionTabs so the contract is unit-testable without rendering the tabs component (which relies on React hooks).

      Parameters

      • optionLabels: readonly string[]
      • discKey: string
      • newIndex: number

      Returns Record<string, string> | undefined