Render as toggle
Show a boolean column as a toggle switch. Flipping it updates the same-named column of a chosen table, matching the row by a key derived from the displayed row.
Ingredient Family: customShowIngredientsList
Outline Display: Show the column {{columnName}} as a toggle that writes back to table {{table}}
Local scope
The parent slot binds these (look up the slot in the parent to see how):
$table– The table of columns that we want to change the display of
Names introduced within this component’s knobs:
table– table chosen from the app’s schema (viatableknob)key– key column oftabletouched– empty table populated by ingredients
Settings
Required
-
columnName: column of$table(type filter: exactly bool; required, non-nullable (optional or required))
The boolean column to show as a toggle -
table: table
The table to update when the toggle is flipped -
toKey: formula (returns type ofkey)
How to find which row of the table to update, given the displayed row
Scope: all columns of$table(reference as[ColumnName], e.g.,[Name],[Price])