1

We have magento 2.1.9ce.

And we need to add a lot of new products in the next few weeks> That's why I would like to easy up some little things.

There are 2 attributes when making the product where I would lik eto change the placeholder size.

Current situation: enter image description here When I inspect the code I can change the place holder size to:

<select multiple="" class="admin__control-multiselect" data-bind="
    attr: {
        name: inputName,
        id: uid,
        size: size ? size : '6',
        disabled: disabled,
        'aria-describedby': noticeId,
        placeholder: placeholder
    },
    hasFocus: focused,
    optgroup: options,
    selectedOptions: value,
    optionsValue: 'value',
    optionsText: 'label'" name="product[kleur]" id="HL7HO0G" size="17" aria-describedby="notice-HL7HO0G" placeholder="">

and:

<select multiple="" class="admin__control-multiselect" data-bind="
    attr: {
        name: inputName,
        id: uid,
        size: size ? size : '6',
        disabled: disabled,
        'aria-describedby': noticeId,
        placeholder: placeholder
    },
    hasFocus: focused,
    optgroup: options,
    selectedOptions: value,
    optionsValue: 'value',
    optionsText: 'label'" name="product[soort]" id="A4PDRTU" size="12" aria-describedby="notice-A4PDRTU" placeholder="">

That gives this wanted result:

enter image description here

Now I can select much faster all the right options.

How can I do this?

0

For now i have changed the default=6 to a larger number.

Now all Selectboxes are changed. this can you do in vendor/magento/module-ui/Component/Form/Element/MultiSelect.php

here you can change it to any number you like:

const DEFAULT_SIZE = 6;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for?Browse other questions tagged or ask your own question.