@ohhwells/bridge 0.1.65-next.185 → 0.1.65-next.186

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -7263,7 +7263,6 @@ function insertField(form, type) {
7263
7263
  const input = fieldInputOf(wrapper);
7264
7264
  if (input) {
7265
7265
  input.setAttribute("name", key);
7266
- input.setAttribute("data-ohw-key", key);
7267
7266
  input.removeAttribute("required");
7268
7267
  input.setAttribute("placeholder", defaults.placeholder);
7269
7268
  input.value = "";
@@ -7280,9 +7279,11 @@ function duplicateField(form, wrapper) {
7280
7279
  const input = fieldInputOf(copy);
7281
7280
  if (input) {
7282
7281
  input.setAttribute("name", key);
7283
- input.setAttribute("data-ohw-key", key);
7282
+ input.removeAttribute("data-ohw-key");
7284
7283
  input.value = "";
7285
7284
  }
7285
+ const label = fieldLabelOf(copy);
7286
+ if (label) label.setAttribute("data-ohw-key", `${key}-label`);
7286
7287
  wrapper.after(copy);
7287
7288
  return copy;
7288
7289
  }
@@ -7325,8 +7326,8 @@ function reconcileFieldsFromContent(form, content) {
7325
7326
  const input = fieldInputOf(wrapper);
7326
7327
  if (input) {
7327
7328
  input.setAttribute("name", spec.key);
7328
- input.setAttribute("data-ohw-key", spec.key);
7329
7329
  }
7330
+ fieldLabelOf(wrapper)?.setAttribute("data-ohw-key", `${spec.key}-label`);
7330
7331
  byKey.set(spec.key, wrapper);
7331
7332
  }
7332
7333
  applyFieldType(wrapper, spec.type);