Skip to content

Commit 3264533

Browse files
authored
Merge pull request #3190 from nextcloud/fix/type_prop_NcTextField
Allow 'search' as type prop for NcTextField
2 parents c0156cd + 9138143 commit 3264533

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/NcTextField/NcTextField.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ export default {
127127
@input="handleInput">
128128
<!-- Default slot for the leading icon -->
129129
<slot />
130-
<template slot="trailing-button-icon">
130+
<!-- Trailing icon slot, except for search type input as the browser already adds a trailing close icon -->
131+
<template v-if="type !== 'search'" slot="trailing-button-icon">
131132
<Close v-if="trailingButtonIcon === 'close'" :size="20" />
132133
<ArrowRight v-else-if="trailingButtonIcon === 'arrowRight'" :size="20" />
133134
</template>
@@ -174,6 +175,7 @@ export default {
174175
'email',
175176
'tel',
176177
'url',
178+
'search',
177179
].includes(value),
178180
},
179181

0 commit comments

Comments
 (0)