Discovered an undoc feature "data-input-preset-prefix-input"... added to API as "prefixInput"
This commit is contained in:
parent
69542c311c
commit
8ca1f8b7a3
|
|
@ -10,6 +10,8 @@
|
|||
* for the source and destination input elements.
|
||||
* - data-input-preset-type: specifies the conversion type. Supported values are:
|
||||
* url, file, slug, camel.
|
||||
* - data-input-preset-prefix-input: optional, prefixes the converted value with the value found
|
||||
* in the supplied input element using a CSS selector.
|
||||
*
|
||||
* Example: <input type="text" id="name" value=""/>
|
||||
* <input type="text"
|
||||
|
|
|
|||
|
|
@ -458,6 +458,10 @@ class FormField
|
|||
'data-input-preset-closest-parent' => 'form'
|
||||
];
|
||||
|
||||
if ($prefixInput = array_get($this->preset, 'prefixInput')) {
|
||||
$newAttributes['data-input-preset-prefix-input'] = $prefixInput;
|
||||
}
|
||||
|
||||
$attributes = $attributes + $newAttributes;
|
||||
return $attributes;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue