Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add failing test case for container width change #599

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
22 changes: 22 additions & 0 deletions test-app/app/controllers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ export default class ModifierController extends Controller {
{ fruit: 'lemon', day: 'Sunday' },
];

@tracked mutableRecords = ['Zero', 'One', 'Two', 'Three', 'Four'];

@action handleDragChange(reordered) {
this.records = reordered;
}
Expand Down Expand Up @@ -76,4 +78,24 @@ export default class ModifierController extends Controller {
set(this, 'model.itemsGrid2', newOrder);
set(this, 'model.dragged', draggedModel);
}

@action
updateMutable(newOrder, draggedMode) {
this.mutableRecords = newOrder;
}

@action
removeItemHorizontal(item) {
this.mutableRecords = this.mutableRecords.filter(
(record) => record !== item,
);
}

@action
addItemToHorizontal() {
this.mutableRecords = [
...this.mutableRecords,
`Item ${this.mutableRecords.length + 1}`,
];
}
}
36 changes: 36 additions & 0 deletions test-app/app/styles/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -295,3 +295,39 @@
.word-break {
word-wrap: break-word;
}

.flex {
display: flex;
}

.flex-1 {
flex: 1;
}

.inline-flex {
display: inline-flex;
}

.align-items-center {
align-items: center;
}

.space-between {
justify-content: space-between;
}

.flex-column {
flex-direction: column;
}

.flex-row {
flex-direction: row;
}

.full-width {
width: 100%;
}

.mr-5 {
margin-right: 5px;
}
Loading