 class Lanes.Components.RecordFinder extends Lanes.React.Component
 
     propTypes:
-        query:    Lanes.PropTypes.State.isRequired
-        model:    Lanes.PropTypes.State.isRequired
-        commands: React.PropTypes.object
-        onModelSet: React.PropTypes.func
+        query:       Lanes.PropTypes.State.isRequired
+        model:       Lanes.PropTypes.State
+        parentModel: Lanes.PropTypes.State
+        commands:    React.PropTypes.object
+        onModelSet:  React.PropTypes.func
 
     contextTypes:
         viewport: Lanes.PropTypes.State.isRequired

        ).then(Lanes.emptyFn, Lanes.emptyFn)

    setModel: (model) ->
        @props.commands?.setModel(model)
        @props.onModelSet?(model)


    mixins: [
        Lanes.Components.Form.FieldMixin
    ]
    modelForAccess: ->
        if @props.parentModel
            @props.parentModel[@props.associationName]
        else
            @props.model

    showFinder: ->
        @context.viewport.displayModal(
