Skip to content

Commit

Permalink
Added full option content
Browse files Browse the repository at this point in the history
  • Loading branch information
ranbena committed Feb 28, 2019
1 parent 3f7af31 commit 1300499
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
4 changes: 4 additions & 0 deletions client/app/assets/less/redash/tags-control.less
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
&.inline-tags-control {
display: inline-block;
}

&.disabled {
opacity: 0.4;
}
}

// This is for using .inline-tags-control in Angular which renders
Expand Down
12 changes: 9 additions & 3 deletions client/app/components/QuerySelector.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,15 @@ export function QuerySelector(props) {
filterOption={false}
defaultActiveFirstOption={false}
>
{searchResults && searchResults.map(q => (
<Option value={q.id} key={q.id}>{q.name}</Option>
))}
{searchResults && searchResults.map((q) => {
const disabled = q.is_draft;
return (
<Option value={q.id} key={q.id} disabled={disabled}>
{q.name}{' '}
<QueryTagsControl isDraft={q.is_draft} tags={q.tags} className={cx('inline-tags-control', { disabled })} />
</Option>
);
})}
</Select>
);
}
Expand Down

0 comments on commit 1300499

Please sign in to comment.