Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions docs/app/templates/public-pages/docs/migrate-8-0-to-9-0.gts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,17 @@ import { LinkTo } from '@ember/routing';
<code>sass-embedded</code>.
</p>
</li>
<li>
<p>
The
<code>dropdown</code>
option has been removed from
<code>calculatePosition</code>. Previously, this option passed the
current class instance to
<code>calculatePosition</code>.<br />
Note: This option was never documented.
</p>
</li>
<li>
<p>
Passing
Expand Down
1 change: 0 additions & 1 deletion ember-basic-dropdown/src/components/basic-dropdown.gts
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,6 @@ export default class BasicDropdown extends Component<BasicDropdownSignature> {
previousVerticalPosition,
renderInPlace,
matchTriggerWidth,
dropdown: this,
},
);
return this.applyReposition(triggerElement, dropdownElement, positionData);
Expand Down
2 changes: 0 additions & 2 deletions ember-basic-dropdown/src/utils/calculate-position.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type BasicDropdown from '../components/basic-dropdown.gts';
import type { VerticalPosition, HorizontalPosition } from '../types.ts';

// To avoid breaking the current types export we need this
Expand All @@ -11,7 +10,6 @@ export interface CalculatePositionOptions {
previousHorizontalPosition?: HorizontalPosition | undefined;
previousVerticalPosition?: VerticalPosition | undefined;
renderInPlace: boolean;
dropdown: BasicDropdown;
}

export type CalculatePositionResultStyle = {
Expand Down
16 changes: 7 additions & 9 deletions test-app/tests/integration/components/basic-dropdown-test.gts
Original file line number Diff line number Diff line change
Expand Up @@ -1057,13 +1057,8 @@ module('Integration | Component | basic-dropdown', function (hooks) {
const self = this;

assert.expect(4);
this.calculatePosition = function (
_triggerElement,
_dropdownElement,
_destinationElement,
{ dropdown },
) {
assert.ok(dropdown, 'dropdown should be passed to the component');
this.calculatePosition = function () {
assert.ok('custom calculatePosition was passed to the component');
return {
horizontalPosition: 'right',
verticalPosition: 'above',
Expand Down Expand Up @@ -1118,9 +1113,12 @@ module('Integration | Component | basic-dropdown', function (hooks) {
_triggerElement,
_dropdownElement,
_destinationElement,
{ dropdown, renderInPlace },
{ renderInPlace },
) {
assert.ok(dropdown, 'dropdown should be passed to the component');
assert.ok(
renderInPlace,
'custom calculatePosition with renderInPlace was passed to the component',
);
if (renderInPlace) {
return {
horizontalPosition: 'right',
Expand Down