X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/93926d5be6b62da8d8bedea1c9c3a63fd4e71b31..103b02cad3a181951a3872fa8f6a811a7125fdda:/src/views-components/sharing-dialog/participant-select.tsx diff --git a/src/views-components/sharing-dialog/participant-select.tsx b/src/views-components/sharing-dialog/participant-select.tsx index a5d39479..a826fcd5 100644 --- a/src/views-components/sharing-dialog/participant-select.tsx +++ b/src/views-components/sharing-dialog/participant-select.tsx @@ -28,6 +28,8 @@ interface ParticipantSelectProps { label?: string; autofocus?: boolean; onlyPeople?: boolean; + onlyActive?: boolean; + disabled?: boolean; onBlur?: (event: React.FocusEvent) => void; onFocus?: (event: React.FocusEvent) => void; @@ -72,11 +74,12 @@ export const ParticipantSelect = connect()( onChange={this.handleChange} onCreate={this.handleCreate} onSelect={this.handleSelect} - onDelete={this.handleDelete} + onDelete={this.props.onDelete && !this.props.disabled ? this.handleDelete : undefined} onFocus={this.props.onFocus} onBlur={this.props.onBlur} renderChipValue={this.renderChipValue} - renderSuggestion={this.renderSuggestion} /> + renderSuggestion={this.renderSuggestion} + disabled={this.props.disabled}/> ); } @@ -131,6 +134,7 @@ export const ParticipantSelect = connect()( const filterUsers = new FilterBuilder() .addILike('any', value) + .addEqual('is_active', this.props.onlyActive || undefined) .addNotIn('uuid', this.props.excludedParticipants) .getFilters(); const userItems: ListResults = await userService.list({ filters: filterUsers, limit, count: "none" });