fix(vue): input components update refs on ionInput (#26876)

resolves #26700
This commit is contained in:
Liam DeBeasi
2023-03-02 09:09:25 -05:00
committed by GitHub
parent e11aa153e2
commit 7d9ce7420a
5 changed files with 44 additions and 11 deletions

View File

@ -10,10 +10,19 @@ import type { App, Plugin } from "vue";
* otherwise the binding's callback will fire before any
* v-model values have been updated.
*/
const toKebabCase = (eventName: string) =>
eventName === "ionChange"
? "v-ion-change"
: eventName.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase();
const toKebabCase = (eventName: string) => {
const kebabConvert = (name: string) =>
name.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase();
switch (eventName) {
case "ionInput":
return "v-ion-input";
case "ionChange":
return "v-ion-change";
default:
return kebabConvert(eventName);
}
};
const getHelperFunctions = () => {
return {