Tally UI

RegisterColumn

Register selection, opening, counting, or cart content for the current session

Import

import { RegisterColumn } from '@tallyui/components';

Usage

<RegisterColumn
  register={register}
  registerId={registerId}
  registers={registers}
  onPick={(id) => bindRegister(id)}
  currency="EUR"
  countSlot={countContent}
  cartEmpty={sale.order.lineItems.length === 0}
>
  {cartContent}
</RegisterColumn>

Renders the register picker, opening card, count content, or cart children according to register state. An unfinished closed session gets a Finish closing card, and an overdue open session with an empty cart gets a Close register offer.

Props

PropTypeDefaultDescription
registerReturnType<typeof useRegisterSession>requiredRegister session state that selects the picker, opening, counting, or selling content
registerIdstring | nullrequiredBound register ID passed into useRegisterSession; null shows the picker
registersRegisterPickerRegister[]requiredRegister choices passed to RegisterPicker
onPick(id: string) => voidrequiredHandler passed to the picker for binding the selected register
currencystringrequiredISO 4217 code forwarded to OpenRegisterCard
configuredFloatMinornumber | null---Opening float in minor units forwarded to OpenRegisterCard
countSlotReactNode---Replaces the cart while counting or while a closed session's close is in flight; an unfinished close otherwise shows the Finish closing card
cartEmptyboolean---Whether the cart has no lines; enables the overdue Close register offer
childrenReactNoderequiredCart content shown when a register is bound, open, and not counting

On this page