smartcomponents icon indicating copy to clipboard operation
smartcomponents copied to clipboard

SmartPasteButton - Add a way to provide custom fields metadata

Open hakenr opened this issue 1 year ago • 1 comments

Real scenario:

  • our HxInputNumber and HxInputDate both render as <input type="text" .../> by default (as there are known issues with type="number" and date)
  • SmartPasteButton recognizes these as string and the result is "43 years old" being pasted to "Age" HxInputNumber

It would be nice to have a possibility to somehow (data attributes?) override the metadata used by the SmartPasteButton

hakenr avatar Mar 22 '24 08:03 hakenr

Sure, this seems reasonable. For now you can use data-smartpaste-description to emit other field-specific instructions into the prompt, so it should be possible to state the exact format the value must conform to (and this is all that we're doing by default with the type attribute anyway so it's not much different).

SteveSandersonMS avatar Mar 22 '24 09:03 SteveSandersonMS