Closed csontosreka closed 5 months ago
Ahh right. I see.
I noticed that in RenderEntityPropertyInstance
you originally had:
...
function isUrl(string) {
let result = isURL(string) && configuration.value.enableUrlMarkup;
return result;
}
...
I removed the check against enableUrlMarkup because it didn't make sense why that check mattered in that function. But the result of removing it is that the url-component was loaded in the template rather than the text-component:
<url-component
v-else-if="isUrl(props.value)"
:property="props.property"
:value="props.value"
@create:entity="createEntity"
/>
I think that extra check actually makes more sense in the template as:
<url-component
v-else-if="isUrl(props.value) && configuration.enableUrlMarkup"
:property="props.property"
:value="props.value"
@create:entity="createEntity"
/>
so that the isUrl method remains simple. It does one thing - it checks if something is a url or not and that's not complicated by the component configuration.
I'll merge this pr and then update as above. Please check - in my testing it's working as it should. Sorry about that.
When updating the URL value in a text field, the input was duplicated and saved as another URL-type value.
Steps to recreate the issue:
I think I was able to solve this issue by checking if
enableUrlMarkup
is true inRenderEntityPropertyInstance.component.vue
.