# Flux 2.0 — Editable cell A table value that is edited where it is shown, with saving and error states. Reference: https://flux.kaptio.com/components/editable-cell/ Requires: https://flux.kaptio.com/tokens/v2/flux.css and flux-components.css ## Use it when Lets someone correct many values without leaving the table: a rate matrix, allocations by date, prices by room type. The value is a button until it is activated, then an input; Enter saves, Escape cancels, and the cell shows that it is saving and, if the save fails, why, with the value still there to fix. ## Do not use it when Not for values that depend on each other and must be saved together; use a form with one Save. Not for long text. Not for the only copy of a value that needs review before it changes; open a Modal with the field and its consequences. ## Markup ### Rate matrix
Hotel Vík, rates per night in ISK. Select a rate to change it.
Room 12 Sep 13 Sep 14 Sep 15 Sep
Double
Twin
Single
### States
StateDouble, 12 Sep
View
Editing
Saving Saving
Error

Below the contracted minimum of 28,000.

## API - flux-editable (class): On the td. data-state is view, editing, saving or error. Add data-numeric for figures. - data-flux-editable (attribute): The cell’s label, such as "Double, 12 Sep", used to name the input. Wires editing. Requires flux-components.js. - flux-editable__value (class): The button. Holds a flux-visually-hidden "Edit