CustomField on GridLayout cannot be resized

Hi I’ve designed QuantityField that extends CustomField and put it on GridLayout. GridLayout has three components (TextField, QuantityField, TextField). Two TextField can be resized, but QuantityField can not be resized. Why? Please tell me the cause.

Public class QuantityField extends CustomField {

    /** figure */
    private TextField figureField;

    /** Unit */
    private ComboBox unitField;

    /**
     * No Argument Constructor
     */
    public RQuantityField() {
        figureField = new TextField();
        unitField = new ComboBox<>();
    }

    /**
     * Constructor with caption
     *
     * @param caption caption
     */
    public RQuantityField(String caption) {
        this();
        setCaption(caption);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    protected Component initContent() {

        HorizontalLayout layout = new HorizontalLayout();
        layout.setHeight("25px");
        layout.setWidth("100%");
        layout.setMargin(false);
        layout.setSpacing(false);

        figureField.setWidth("100%");
        layout.addComponent(figureField);
        layout.addComponent(unitField);

        return layout;
    }

    @Override
    protected void doSetValue(String value) {
        figureField.setValue(value);
    }

    @Override
    public String getValue() {
        return figureField.getValue();
    }
}
    protected void init(VaadinRequest request) {

        GridLayout layout = new GridLayout(3,1);
        layout.setSizeFull();
        setContent(layout);
        layout.setMargin(true);
        layout.setSpacing(false);

        TextField textField1 = new TextField("Label 1");
        layout.addComponent(textField1, 0, 0);
        textField1.setWidth("100%");

        QuantityField q = new QuantityField("Label 2");
        layout.addComponent(q, 1, 0);
        q.setWidth("100%");

        TextField textField3 = new TextField("Label 3");
        layout.addComponent(textField3, 2, 0);
        textField3.setWidth("100%");

    }

Best regards,