File tree Expand file tree Collapse file tree 1 file changed +13
-10
lines changed
src/Autocomplete/assets/src Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -135,18 +135,21 @@ export default class extends Controller {
135
135
#getCommonConfig( ) : Partial < TomSettings > {
136
136
const plugins : TPluginHash = { } ;
137
137
138
- // multiple values excepted if this is NOT A select (i.e. input) or a multiple select
139
- const isMultiple = ! this . selectElement || this . selectElement . multiple ;
140
- if ( ! this . formElement . disabled && ! isMultiple ) {
141
- plugins . clear_button = { title : '' } ;
142
- }
138
+ // automaticly add plugins when NOT explicit configured
139
+ if ( ! this . tomSelectOptionsValue || ! this . tomSelectOptionsValue . plugins !== undefined ) {
140
+ // multiple values excepted if this is NOT A select (i.e. input) or a multiple select
141
+ const isMultiple = ! this . selectElement || this . selectElement . multiple ;
142
+ if ( ! this . formElement . disabled && ! isMultiple ) {
143
+ plugins . clear_button = { title : '' } ;
144
+ }
143
145
144
- if ( isMultiple ) {
145
- plugins . remove_button = { title : '' } ;
146
- }
146
+ if ( isMultiple ) {
147
+ plugins . remove_button = { title : '' } ;
148
+ }
147
149
148
- if ( this . urlValue ) {
149
- plugins . virtual_scroll = { } ;
150
+ if ( this . urlValue ) {
151
+ plugins . virtual_scroll = { } ;
152
+ }
150
153
}
151
154
152
155
const render : Partial < TomTemplates > = {
You can’t perform that action at this time.
0 commit comments