smartcomponents
smartcomponents copied to clipboard
SmartPasteButton - Add a way to provide custom fields metadata
Real scenario:
- our HxInputNumber and HxInputDate both render as
<input type="text" .../>by default (as there are known issues withtype="number"anddate) - SmartPasteButton recognizes these as
stringand 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
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).