Skip to content

Commit

Permalink
fix(stepper): horizontal scroll was not appearing when needed in cert…
Browse files Browse the repository at this point in the history
…ain cases. (closes #282) (#640)

* fix(stepper): horizontal scroll was not appearing when needed in certain cases

* fix(stepper): missing auto overflow for content

* fix(): missing autocomplete module in components

* fix(stepper): add cdkScrollable to have a hook for repositioning autocomplete, etc
  • Loading branch information
emoralesb05 authored and kyleledbetter committed May 30, 2017
1 parent 8e9ab29 commit 9542139
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/app/components/components/components.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ import { DocumentationToolsModule } from '../../documentation-tools';
MdTabsModule,
MdTooltipModule,
MdProgressBarModule,
MdAutocompleteModule,
/** Covalent Modules */
CovalentCommonModule,
CovalentLayoutModule,
Expand Down
4 changes: 2 additions & 2 deletions src/platform/core/steps/step-body/step-body.component.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<div layout="row" flex>
<ng-content></ng-content>
<div flex>
<div class="td-step-body" flex>
<div class="td-step-content-wrapper"
[@tdCollapse]="!active">
<div #contentRef [class.td-step-content]="contentRef.children.length || contentRef.textContent.trim()">
<div #contentRef cdkScrollable [class.td-step-content]="contentRef.children.length || contentRef.textContent.trim()">
<ng-content select="[td-step-body-content]"></ng-content>
</div>
<div #actionsRef layout="row" [class.td-step-actions]="actionsRef.children.length || actionsRef.textContent.trim()">
Expand Down
6 changes: 6 additions & 0 deletions src/platform/core/steps/step-body/step-body.component.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.td-step-body {
overflow-x: hidden;
.td-step-content {
overflow-x: auto;
}
}
3 changes: 2 additions & 1 deletion src/platform/core/steps/steps.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Type } from '@angular/core';
import { NgModule, ModuleWithProviders } from '@angular/core';

import { CommonModule } from '@angular/common';
import { MdIconModule, MdRippleModule, PortalModule } from '@angular/material';
import { MdIconModule, MdRippleModule, PortalModule, ScrollDispatchModule } from '@angular/material';

import { CovalentCommonModule } from '../common/common.module';

Expand Down Expand Up @@ -32,6 +32,7 @@ export { TdStepsComponent, IStepChangeEvent, StepMode } from './steps.component'
MdIconModule,
MdRippleModule,
PortalModule,
ScrollDispatchModule,
CovalentCommonModule,
],
declarations: [
Expand Down

0 comments on commit 9542139

Please sign in to comment.