forked from valor-software/ngx-bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(popover): add adaptivePosition option (valor-software#5183)
* feat(popover): add adaptivePosition option to disable adaptive positioning
- Loading branch information
Showing
17 changed files
with
379 additions
and
304 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
demo/src/app/components/+popover/demos/adaptive-position/adaptive-position.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<button type="button" class="btn btn-default btn-secondary" | ||
popover="Vivamus sagittis lacus vel augue laoreet rutrum faucibus." | ||
popoverTitle="Popover on top" | ||
[adaptivePosition]="false" | ||
placement="top"> | ||
Popover on top | ||
</button> | ||
|
||
<button type="button" class="btn btn-default btn-secondary" | ||
popover="Vivamus sagittis lacus vel augue laoreet rutrum faucibus." | ||
popoverTitle="Popover on right" | ||
[adaptivePosition]="false" | ||
placement="right"> | ||
Popover on right | ||
</button> |
7 changes: 7 additions & 0 deletions
7
demo/src/app/components/+popover/demos/adaptive-position/adaptive-position.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'demo-popover-adaptive-position', | ||
templateUrl: './adaptive-position.html' | ||
}) | ||
export class DemoPopoverAdaptivePositionComponent {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,39 @@ | ||
import { DemoPopoverAdaptivePositionComponent } from './adaptive-position/adaptive-position'; | ||
import { DemoPopoverBasicComponent } from './basic/basic'; | ||
import { DemoPopoverPlacementComponent } from './placement/placement'; | ||
import { DemoPopoverByIsOpenPropComponent } from './trigger-by-isopen-property/trigger-by-isopen-property'; | ||
import { DemoPopoverClassComponent } from './class/class'; | ||
import { DemoPopoverConfigComponent } from './config/config'; | ||
import { DemoPopoverContainerComponent } from './container/container'; | ||
import { DemoPopoverContextComponent } from './popover-context/popover-context'; | ||
import { DemoPopoverCustomContentComponent } from './custom-content/custom-content'; | ||
import { DemoPopoverDismissComponent } from './dismiss/dismiss'; | ||
import { DemoPopoverDynamicComponent } from './dynamic/dynamic'; | ||
import { DemoPopoverCustomContentComponent } from './custom-content/custom-content'; | ||
import { DemoPopoverDynamicHtmlComponent } from './dynamic-html/dynamic-html'; | ||
import { DemoPopoverContainerComponent } from './container/container'; | ||
import { DemoPopoverConfigComponent } from './config/config'; | ||
import { DemoPopoverEventsComponent } from './events/events'; | ||
import { DemoPopoverOutsideClickComponent } from './outside-click/outside-click'; | ||
import { DemoPopoverPlacementComponent } from './placement/placement'; | ||
import { DemoPopoverStylingGlobalComponent } from './styling-global/styling-global'; | ||
import { DemoPopoverStylingLocalComponent } from './styling-local/styling-local'; | ||
import { DemoPopoverTriggersCustomComponent } from './triggers-custom/triggers-custom'; | ||
import { DemoPopoverTriggersManualComponent } from './triggers-manual/triggers-manual'; | ||
import { DemoPopoverByIsOpenPropComponent } from './trigger-by-isopen-property/trigger-by-isopen-property'; | ||
import { DemoPopoverClassComponent } from './class/class'; | ||
import { DemoPopoverOutsideClickComponent } from './outside-click/outside-click'; | ||
import { DemoPopoverEventsComponent } from './events/events'; | ||
import { DemoPopoverContextComponent } from './popover-context/popover-context'; | ||
|
||
export const DEMO_COMPONENTS = [ | ||
DemoPopoverAdaptivePositionComponent, | ||
DemoPopoverBasicComponent, | ||
DemoPopoverPlacementComponent, | ||
DemoPopoverByIsOpenPropComponent, | ||
DemoPopoverClassComponent, | ||
DemoPopoverConfigComponent, | ||
DemoPopoverContainerComponent, | ||
DemoPopoverContextComponent, | ||
DemoPopoverCustomContentComponent, | ||
DemoPopoverDismissComponent, | ||
DemoPopoverDynamicComponent, | ||
DemoPopoverCustomContentComponent, | ||
DemoPopoverDynamicHtmlComponent, | ||
DemoPopoverContainerComponent, | ||
DemoPopoverConfigComponent, | ||
DemoPopoverEventsComponent, | ||
DemoPopoverOutsideClickComponent, | ||
DemoPopoverPlacementComponent, | ||
DemoPopoverStylingGlobalComponent, | ||
DemoPopoverStylingLocalComponent, | ||
DemoPopoverTriggersCustomComponent, | ||
DemoPopoverTriggersManualComponent, | ||
DemoPopoverByIsOpenPropComponent, | ||
DemoPopoverClassComponent, | ||
DemoPopoverOutsideClickComponent, | ||
DemoPopoverEventsComponent, | ||
DemoPopoverContextComponent | ||
DemoPopoverTriggersManualComponent | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,31 @@ | ||
import { DemoTooltipBasicComponent } from './basic/basic'; | ||
import { DemoTooltipPlacementComponent } from './placement/placement'; | ||
import { DemoTooltipDismissComponent } from './dismiss/dismiss'; | ||
import { DemoTooltipDynamicComponent } from './dynamic/dynamic'; | ||
import { DemoTooltipClassComponent } from './class/class'; | ||
import { DemoTooltipConfigComponent } from './config/config'; | ||
import { DemoTooltipContainerComponent } from './container/container'; | ||
import { DemoTooltipCustomContentComponent } from './custom-content/custom-content'; | ||
import { DemoTooltipDelayComponent } from './delay/delay'; | ||
import { DemoTooltipDismissComponent } from './dismiss/dismiss'; | ||
import { DemoTooltipDynamicComponent } from './dynamic/dynamic'; | ||
import { DemoTooltipDynamicHtmlComponent } from './dynamic-html/dynamic-html'; | ||
import { DemoTooltipPlacementComponent } from './placement/placement'; | ||
import { DemoTooltipStylingGlobalComponent } from './styling-global/styling-global'; | ||
import { DemoTooltipStylingLocalComponent } from './styling-local/styling-local'; | ||
import { DemoTooltipTriggersCustomComponent } from './triggers-custom/triggers-custom'; | ||
import { DemoTooltipTriggersManualComponent } from './triggers-manual/triggers-manual'; | ||
import { DemoTooltipDynamicHtmlComponent } from './dynamic-html/dynamic-html'; | ||
import { DemoTooltipClassComponent } from './class/class'; | ||
import { DemoTooltipDelayComponent } from './delay/delay'; | ||
import { DemoTooltipCustomContentComponent } from './custom-content/custom-content'; | ||
|
||
export const DEMO_COMPONENTS = [ | ||
DemoTooltipBasicComponent, | ||
DemoTooltipPlacementComponent, | ||
DemoTooltipDismissComponent, | ||
DemoTooltipClassComponent, | ||
DemoTooltipConfigComponent, | ||
DemoTooltipContainerComponent, | ||
DemoTooltipCustomContentComponent, | ||
DemoTooltipDelayComponent, | ||
DemoTooltipDismissComponent, | ||
DemoTooltipDynamicComponent, | ||
DemoTooltipDynamicHtmlComponent, | ||
DemoTooltipContainerComponent, | ||
DemoTooltipConfigComponent, | ||
DemoTooltipPlacementComponent, | ||
DemoTooltipStylingGlobalComponent, | ||
DemoTooltipStylingLocalComponent, | ||
DemoTooltipTriggersCustomComponent, | ||
DemoTooltipTriggersManualComponent, | ||
DemoTooltipClassComponent, | ||
DemoTooltipDelayComponent | ||
DemoTooltipTriggersManualComponent | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
demo/src/app/components/+typeahead/demos/adaptive-position/adaptive-position.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<pre class="card card-block card-header mb-3">Model: {{selected | json}}</pre> | ||
<input [(ngModel)]="selected" | ||
[typeahead]="states" | ||
adaptivePosition="true" | ||
[adaptivePosition]="true" | ||
class="form-control"> |
Oops, something went wrong.