Skip to content
bahtuiv0.6.0

<baht-keyvalue-editor>

Inline key = value row editor for field maps and config objects. Rows with an empty key are kept while editing but dropped from the emitted object.

Edit an object

Listen to baht-change and store detail.value.

<baht-keyvalue-editor add-label="Add row"></baht-keyvalue-editor>

<script>
  const el = document.querySelector('baht-keyvalue-editor');
  el.value = {
    "state": "resolved",
    "priority": "p2"
  };
</script>
NameTypeDefaultDescription
valueJSRecord<string, unknown>{}The object being edited
key-placeholderstring'key'Key input placeholder
value-placeholderstring'value'Value input placeholder
add-labelstring'Add row'Add button text
disabledbooleanfalseDisabled
EventdetailDescription
nameCustomEvent
baht-change{ value }The object after any edit