File tree 2 files changed +3
-2
lines changed
2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 58
58
@click =" emit('toggle')"
59
59
/>
60
60
</div >
61
- <span v-if =" $slots['clear-icon'] && inputValue && clearable && !disabled && !readonly" class =" dp--clear-btn"
61
+ <span v-if =" $slots['clear-icon'] && (alwaysClearable || inputValue && clearable && !disabled && !readonly) " class =" dp--clear-btn"
62
62
><slot name =" clear-icon" :clear =" onClear"
63
63
/></span >
64
64
<button
65
- v-if =" clearable && !$slots['clear-icon'] && inputValue && !disabled && !readonly"
65
+ v-if =" !$slots['clear-icon'] && (alwaysClearable || clearable && inputValue && !disabled && !readonly) "
66
66
:aria-label =" defaultedAriaLabels?.clearInput"
67
67
class =" dp--clear-btn"
68
68
type =" button"
Original file line number Diff line number Diff line change @@ -120,6 +120,7 @@ export const AllProps = {
120
120
placeholder : { type : String as PropType < string > , default : '' } ,
121
121
hideInputIcon : { type : Boolean as PropType < boolean > , default : false } ,
122
122
clearable : { type : Boolean as PropType < boolean > , default : true } ,
123
+ alwaysClearable : { type : Boolean as PropType < boolean > , default : false } ,
123
124
state : { type : Boolean as PropType < boolean | null > , default : null } ,
124
125
required : { type : Boolean as PropType < boolean > , default : false } ,
125
126
autocomplete : { type : String as PropType < string > , default : 'off' } ,
You can’t perform that action at this time.
0 commit comments