         sortBy:     type: 'any'
         component:  type: 'function'
         onColumnClick: type: 'function'
+        fetchIndex: type: 'integer'
 
     derived:
         default_value: deps: ['id'], fn: ->

            deps: ['model_field'], fn: ->
                type = @model_field?.type || 'string'
                if type == "code" then "string" else type
        fetchIndex:
            fn: ->
                fetchIndex = 0
                for field, index in this.collection.models
                    return fetchIndex if this == field
                    fetchIndex += 1 if field.query

    validValue: (value) ->
        if this.type == 'n'


    constructor: (models, options) ->
        @query = options.query
        this.on('add remove reset', @calculateFetchIndexes)
        this.on('change', (changing) ->
            return unless changing.selected
            for model in @models
