fix: typeahead sort and styling (#396)
This commit is contained in:
@@ -26,7 +26,7 @@ const URLUploader = () => {
|
||||
</div>
|
||||
<div className="x-small align-self-center justify-content-center mx-2 text-dark font-weight-normal">OR</div>
|
||||
<div className="zindex-9 video-id-prompt p-4">
|
||||
<InputGroup>
|
||||
<InputGroup className="video-upload-input-group">
|
||||
<FormControl
|
||||
placeholder={intl.formatMessage(messages.pasteURL)}
|
||||
aria-label={intl.formatMessage(messages.pasteURL)}
|
||||
|
||||
@@ -107,7 +107,7 @@ Object {
|
||||
class="zindex-9 video-id-prompt p-4"
|
||||
>
|
||||
<div
|
||||
class="input-group"
|
||||
class="video-upload-input-group input-group"
|
||||
>
|
||||
<div
|
||||
class="pgn__form-control-decorator-group"
|
||||
@@ -265,7 +265,7 @@ Object {
|
||||
class="zindex-9 video-id-prompt p-4"
|
||||
>
|
||||
<div
|
||||
class="input-group"
|
||||
class="video-upload-input-group input-group"
|
||||
>
|
||||
<div
|
||||
class="pgn__form-control-decorator-group"
|
||||
|
||||
@@ -111,7 +111,7 @@ Object {
|
||||
class="zindex-9 video-id-prompt p-4"
|
||||
>
|
||||
<div
|
||||
class="input-group"
|
||||
class="video-upload-input-group input-group"
|
||||
>
|
||||
<div
|
||||
class="pgn__form-control-decorator-group"
|
||||
@@ -275,7 +275,7 @@ Object {
|
||||
class="zindex-9 video-id-prompt p-4"
|
||||
>
|
||||
<div
|
||||
class="input-group"
|
||||
class="video-upload-input-group input-group"
|
||||
>
|
||||
<div
|
||||
class="pgn__form-control-decorator-group"
|
||||
|
||||
@@ -37,13 +37,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
.form-control {
|
||||
font-size: 0.875rem !important;
|
||||
width: 308px !important;
|
||||
height: 44px !important;
|
||||
.video-upload-input-group{
|
||||
.form-control {
|
||||
font-size: 0.875rem !important;
|
||||
width: 308px !important;
|
||||
height: 44px !important;
|
||||
}
|
||||
|
||||
.pgn__icon.pgn__icon__lg {
|
||||
width: 3.625rem !important;
|
||||
height: 3.625rem !important;
|
||||
}
|
||||
}
|
||||
|
||||
.pgn__icon.pgn__icon__lg {
|
||||
width: 3.625rem !important;
|
||||
height: 3.625rem !important;
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import {
|
||||
} from '@edx/paragon';
|
||||
import { Add, ExpandLess, ExpandMore } from '@edx/paragon/icons';
|
||||
import PropTypes from 'prop-types';
|
||||
import { sortBy } from 'lodash-es';
|
||||
// eslint-disable-next-line import/no-unresolved
|
||||
import onClickOutside from 'react-onclickoutside';
|
||||
import FormGroup from './FormGroup';
|
||||
@@ -45,7 +46,9 @@ class TypeaheadDropdown extends React.Component {
|
||||
options = options.filter((option) => (option.toLowerCase().includes(strToFind.toLowerCase())));
|
||||
}
|
||||
|
||||
return options.sort().map((opt) => {
|
||||
const sortedOptions = sortBy(options, (option) => option.toLowerCase());
|
||||
|
||||
return sortedOptions.map((opt) => {
|
||||
let value = opt;
|
||||
if (value.length > 30) {
|
||||
value = value.substring(0, 30).concat('...');
|
||||
|
||||
Reference in New Issue
Block a user