<div>
  <div class="visEditorAgg__formRow--flex">
    <div ng-if="agg.type.params.byName.order && aggParam.options" class="form-group">
      <label for="visEditorOrderByOrder{{agg.id}}">Order</label>
      <select
        id="visEditorOrderByOrder{{agg.id}}"
        name="order"
        ng-model="agg.params.order"
        required
        ng-options="opt as opt.display for opt in aggParam.options"
        class="form-control">
      </select>
    </div>
    <div class="form-group">
      <label for="visEditorOrderBySize{{agg.id}}">Size</label>
      <input
        id="visEditorOrderBySize{{agg.id}}"
        name="size"
        ng-model="agg.params.size"
        required
        class="form-control"
        type="number"
        min="1"
      >
    </div>
  </div>

</div>
