Skip to content

Commit

Permalink
Allow to override showTrailingButton from an NcAction
Browse files Browse the repository at this point in the history
Signed-off-by: Louis Chemineau <[email protected]>
  • Loading branch information
artonge committed Apr 26, 2023
1 parent 5bce4bc commit 076a1f6
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/components/NcActionInput/NcActionInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ For the multiselect component, all events will be passed through. Please see the
:disabled="disabled"
:input-class="{ focusable: isFocusable }"
trailing-button-icon="arrowRight"
:show-trailing-button="value !== '' && !disabled"
:show-trailing-button="showTrailingButton && value !== '' && !disabled"
v-bind="$attrs"
v-on="$listeners"
@trailing-button-click="$refs.form.requestSubmit()"
Expand Down Expand Up @@ -219,7 +219,7 @@ For the multiselect component, all events will be passed through. Please see the
:input-class="{ focusable: isFocusable }"
:type="type"
trailing-button-icon="arrowRight"
:show-trailing-button="value !== '' && !disabled"
:show-trailing-button="showTrailingButton && value !== '' && !disabled"
v-bind="$attrs"
v-on="$listeners"
@trailing-button-click="$refs.form.requestSubmit()"
Expand Down Expand Up @@ -349,6 +349,13 @@ export default {
type: Boolean,
default: null,
},
/**
* Attribute forwarded to the underlining NcPasswordField and NcTextField
*/
showTrailingButton: {
type: Boolean,
default: true,
},
},

emits: [
Expand Down

0 comments on commit 076a1f6

Please sign in to comment.