Skip to content
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

Fix issue with incorrectly named autocomplete option #2727

Merged
merged 2 commits into from
Jul 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions assets/js/app/editor/Components/Select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:limit="1000"
:multiple="multiple"
:options="options"
:searchable="searchable || taggable"
:searchable="autocomplete || taggable"
:show-labels="false"
:taggable="taggable"
:disabled="readonly"
Expand Down Expand Up @@ -75,7 +75,7 @@ export default {
taggable: Boolean,
readonly: Boolean,
classname: String,
searchable: Boolean,
autocomplete: Boolean,
errormessage: String | Boolean, //string if errormessage is set, and false otherwise
},
data: () => {
Expand Down
1 change: 1 addition & 0 deletions src/Configuration/Content/FieldType.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ private static function defaults(): Collection
'height' => '10',
'icon' => '',
'maxlength' => '',
'autocomplete' => true,
]);
}

Expand Down
6 changes: 3 additions & 3 deletions templates/_partials/fields/select.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
{% set multiple = field.definition.get('multiple')|default ? 'true' : 'false' %}
{% endif %}

{% if searchable is not defined %}
{% set searchable = field.definition.get('searchable')|default ? 'true' : 'false' %}
{% if autocomplete is not defined %}
{% set autocomplete = field.definition.get('autocomplete')|default ? 'true' : 'false' %}
{% endif %}

{% block field %}
Expand All @@ -28,7 +28,7 @@
:options="{{ options|json_encode }}"
:form='{{ form|json_encode }}'
:multiple="{{ multiple }}"
:searchable="{{ searchable }}"
:autocomplete="{{ autocomplete }}"
:readonly="{{ readonly|json_encode }}"
:errormessage='{{ errormessage|json_encode }}'
:allowempty="{{ required ? 'false' : 'true' }}"
Expand Down
2 changes: 1 addition & 1 deletion tests/php/Configuration/Parser/ContentTypesParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ContentTypesParserTest extends ParserTestBase

public const AMOUNT_OF_ATTRIBUTES_IN_CONTENT_TYPE = 27;

public const AMOUNT_OF_ATTRIBUTES_IN_FIELD = 27;
public const AMOUNT_OF_ATTRIBUTES_IN_FIELD = 28;

public const ALLOWED_LOCALES = 'en|nl|es|fr|de|pl|it|hu|pt_BR|ja|nb|nn|nl_NL|nl_BE';

Expand Down