` with the class `slds-align_absolute-center` to position the spinner in the middle of the list item, as well as `slds-p-top_medium` to provide the appropiate amount of space for the spinner to be visible.
+
+
+
+
+ }
+ listbox={
+
+ }
+ isOpen
+ hasFocus
+ />
+
+
+
### Grouped options
Options within a `listbox` can be grouped together under meaningful headings. This is useful if you wish to create separation between 2 or more sets of options within a single `listbox`.
diff --git a/ui/components/combobox/listbox/index.jsx b/ui/components/combobox/listbox/index.jsx
index 0c1deb9cb9..db810a924e 100644
--- a/ui/components/combobox/listbox/index.jsx
+++ b/ui/components/combobox/listbox/index.jsx
@@ -7,7 +7,7 @@ import classNames from 'classnames';
import SvgIcon from '../../../shared/svg-icon';
import { StandardIcon } from '../../icons/standard/example';
import { UtilityIcon } from '../../icons/base/example';
-
+import { Spinner } from '../../spinners/base/example';
/**
* Listbox
*/
@@ -295,6 +295,7 @@ class Listbox extends Component {
term,
type,
snapshot,
+ loading,
count = 1,
className = 'slds-dropdown_fluid'
} = this.props;
@@ -319,6 +320,13 @@ class Listbox extends Component {
: Object.keys(snapshot)
.slice(0, count)
.map(this.renderPlainOptions)}
+ {loading && (
+
+
+
+
+
+ )}
);
diff --git a/ui/components/spinners/base/_index.scss b/ui/components/spinners/base/_index.scss
index d121d80879..0ff54ce179 100644
--- a/ui/components/spinners/base/_index.scss
+++ b/ui/components/spinners/base/_index.scss
@@ -43,6 +43,15 @@
transform: translate(-50%, -50%) rotate(90deg);
}
+.slds-spinner_inline {
+ position: relative;
+ top: auto;
+ left: auto;
+ right: auto;
+ bottom: auto;
+ transform: none;
+}
+
.slds-spinner,
.slds-spinner__dot-a,
.slds-spinner__dot-b {
@@ -210,6 +219,10 @@
.slds-spinner--xx-small {
width: 0.5rem;
+ &.slds-spinner_inline {
+ height: 0.5rem;
+ }
+
&.slds-spinner:before,
&.slds-spinner:after,
.slds-spinner__dot-a:before,
@@ -284,6 +297,10 @@
.slds-spinner--x-small {
width: 1rem;
+ &.slds-spinner_inline {
+ height: 1rem;
+ }
+
&.slds-spinner:before,
&.slds-spinner:after,
.slds-spinner__dot-a:before,
@@ -358,6 +375,10 @@
.slds-spinner--small {
width: 1.25rem;
+ &.slds-spinner_inline {
+ height: 1.25rem;
+ }
+
&.slds-spinner:before,
&.slds-spinner:after,
.slds-spinner__dot-a:before,
@@ -432,6 +453,10 @@
.slds-spinner--medium {
width: 2rem;
+ &.slds-spinner_inline {
+ height: 2rem;
+ }
+
&.slds-spinner:before,
&.slds-spinner:after,
.slds-spinner__dot-a:before,
@@ -506,6 +531,10 @@
.slds-spinner--large {
width: 2.75rem;
+ &.slds-spinner_inline {
+ height: 2.75rem;
+ }
+
&.slds-spinner:before,
&.slds-spinner:after,
.slds-spinner__dot-a:before,
diff --git a/ui/components/spinners/base/example.jsx b/ui/components/spinners/base/example.jsx
index a51ce467a8..36f99e667d 100644
--- a/ui/components/spinners/base/example.jsx
+++ b/ui/components/spinners/base/example.jsx
@@ -42,6 +42,17 @@ export default (
);
export let examples = [
+ {
+ id: 'inlined',
+ label: 'Inlined',
+ description:
+ 'A container is not required to use the spinner. Here, it is placed on a dark background to illustrate there is nothing there. The spinner will position itself to the closest positioned parent. So if you want it to spin over a single component, the class
.slds-is-relative
can be added to the parent.',
+ element: (
+
+
+
+ )
+ },
{
id: 'without-container',
label: 'Without Container',