-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option to restrict simple list item creation #1548
base: master
Are you sure you want to change the base?
Conversation
inputs/simple-list-input.vue
Outdated
// Only saves values from the autocomplete list if tag creation restriction is enabled | ||
if (this.restrictItemCreation) { | ||
if (!this.autocompleteValue) { | ||
this.autocompleteValue = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If autocompleteValue
is false and meets the criteria, why do you assign false again to it? 👀
inputs/simple-list.vue
Outdated
@@ -404,5 +418,12 @@ | |||
.list-items-leave-active { | |||
transition: opacity $standard-time $standard-curve; | |||
} | |||
|
|||
.restriction-error-message { | |||
color: rgba(255, 0, 0, 0.54); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you use the corresponding hex value of this color?
inputs/simple-list.vue
Outdated
@@ -359,6 +365,14 @@ | |||
}); | |||
this.update(this.items); | |||
} | |||
}, | |||
onTriggerRestrictionError() { | |||
if (this.args.restrictedErrrorMessage) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (this.args.restrictedErrrorMessage) { | |
if (this.args.restrictedErrorMessage) { |
inputs/simple-list.vue
Outdated
<div class="ui-textbox__feedback" v-if="hasFeedback || maxLength"> | ||
<div class="ui-textbox__feedback-text" v-if="showError">{{ error }}</div> | ||
<div class="ui-textbox__feedback-text" v-else-if="showHelp">{{ args.help }}</div> | ||
<div class="ui-textbox__counter" v-if="maxLength"> | ||
{{ valueLength + '/' + maxLength }} | ||
</div> | ||
</div> | ||
<div class="restriction-error-message" v-if="showRestrictionError">{{ args.restrictedErrrorMessage }}</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<div class="restriction-error-message" v-if="showRestrictionError">{{ args.restrictedErrrorMessage }}</div> | |
<div class="restriction-error-message" v-if="showRestrictionError">{{ args.restrictedErrorMessage }}</div> |
Also, should you add this property to the docs too?
09ab847
to
3071ce5
Compare
Feature Info
Jira Ticket Url
Description