Skip to content

charton API


charton API / @chart-on/ui / index / DraftEditorOptions

Interface: DraftEditorOptions ​

Defined in: ui/src/draft-editor.ts:11

Options for createDraftEditor: the quantity keypad's preset buttons and the largest quantity a draft may have.

Properties ​

maxQuantity? ​

optional maxQuantity?: (ctx) => number

Defined in: ui/src/draft-editor.ts:18

The largest quantity the draft may have, e.g. from the account's buying power.

Parameters ​

ctx ​
draft ​

DraftLine

Returns ​

number


quantityPresets? ​

optional quantityPresets?: readonly QuantityPreset[]

Defined in: ui/src/draft-editor.ts:16

Buttons of the quantity keypad. 'max' and percentages show only when maxQuantity is set. Default [1, 5, 25, 'max', '25%'].