FIX: use css instead of js to fix select-kit-collection max-height
This commit is contained in:
parent
9923829402
commit
97ddaeeae8
|
@ -9,7 +9,6 @@ export default ComboBoxComponent.extend({
|
|||
classNameBindings: ["categoryStyle"],
|
||||
classNames: "category-drop",
|
||||
verticalOffset: 3,
|
||||
collectionHeight: "200",
|
||||
content: Ember.computed.alias("categories"),
|
||||
rowComponent: "category-row",
|
||||
headerComponent: "category-drop/category-drop-header",
|
||||
|
|
|
@ -7,7 +7,6 @@ export default DropdownSelectBoxComponent.extend({
|
|||
pluginApiIdentifiers: ["composer-actions"],
|
||||
classNames: "composer-actions",
|
||||
fullWidthOnMobile: true,
|
||||
collectionHeight: "auto",
|
||||
autofilterable: false,
|
||||
filterable: false,
|
||||
allowInitialValueMutation: false,
|
||||
|
|
|
@ -8,7 +8,6 @@ export default DropdownSelectBoxComponent.extend({
|
|||
nameProperty: "key",
|
||||
fullWidthOnMobile: true,
|
||||
content: allLevels,
|
||||
collectionHeight: "auto",
|
||||
castInteger: true,
|
||||
autofilterable: false,
|
||||
filterable: false,
|
||||
|
|
|
@ -4,7 +4,6 @@ export default DropdownSelectBoxComponent.extend({
|
|||
classNames: ["period-chooser"],
|
||||
rowComponent: "period-chooser/period-chooser-row",
|
||||
headerComponent: "period-chooser/period-chooser-header",
|
||||
collectionHeight: "auto",
|
||||
content: Ember.computed.alias("site.periods"),
|
||||
value: Ember.computed.alias("period"),
|
||||
isHidden: Ember.computed.alias("showPeriods"),
|
||||
|
|
|
@ -54,7 +54,6 @@ export default Ember.Component.extend(UtilsMixin, PluginApiMixin, DomHelpersMixi
|
|||
headerComputedContent: null,
|
||||
collectionHeaderComputedContent: null,
|
||||
collectionComponent: "select-kit/select-kit-collection",
|
||||
collectionHeight: 200,
|
||||
verticalOffset: 0,
|
||||
horizontalOffset: 0,
|
||||
fullWidthOnMobile: false,
|
||||
|
|
|
@ -8,7 +8,6 @@ export default ComboBoxComponent.extend({
|
|||
classNameBindings: ["categoryStyle", "tagClass"],
|
||||
classNames: "tag-drop",
|
||||
verticalOffset: 3,
|
||||
collectionHeight: "200",
|
||||
value: Ember.computed.alias("tagId"),
|
||||
headerComponent: "tag-drop/tag-drop-header",
|
||||
rowComponent: "tag-drop/tag-drop-row",
|
||||
|
|
|
@ -6,7 +6,6 @@ export default DropdownSelectBoxComponent.extend({
|
|||
classNames: ["toolbar-popup-menu-options"],
|
||||
isHidden: Ember.computed.empty("computedContent"),
|
||||
showFullTitle: false,
|
||||
collectionHeight: "auto",
|
||||
|
||||
@computed("title")
|
||||
collectionHeader(title) {
|
||||
|
|
|
@ -42,7 +42,6 @@ export default Ember.Mixin.create({
|
|||
|
||||
@on("didRender")
|
||||
_adjustPosition() {
|
||||
this.$collection().css("max-height", this.get("collectionHeight"));
|
||||
this._applyFixedPosition();
|
||||
this._applyDirection();
|
||||
this._positionWrapper();
|
||||
|
|
|
@ -95,6 +95,7 @@
|
|||
|
||||
.select-box-kit-collection, .select-kit-collection {
|
||||
padding: 0;
|
||||
max-height: auto;
|
||||
}
|
||||
|
||||
.dropdown-select-box-header {
|
||||
|
|
|
@ -197,6 +197,7 @@
|
|||
border-radius: inherit;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
margin: 0;
|
||||
max-height: 200px;
|
||||
|
||||
.select-kit-collection {
|
||||
padding: 0;
|
||||
|
|
|
@ -158,23 +158,6 @@ componentTest('doesn’t render collection content before first expand', {
|
|||
}
|
||||
});
|
||||
|
||||
componentTest('supports options to limit size', {
|
||||
template: '{{single-select collectionHeight=20 content=content}}',
|
||||
|
||||
beforeEach() {
|
||||
this.set("content", ["robin", "régis"]);
|
||||
},
|
||||
|
||||
test(assert) {
|
||||
this.get('subject').expand();
|
||||
|
||||
andThen(() => {
|
||||
const height = find(".select-kit-collection").height();
|
||||
assert.equal(parseInt(height, 10), 20, "it limits the height");
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
componentTest('dynamic headerText', {
|
||||
template: '{{single-select value=1 content=content}}',
|
||||
|
||||
|
|
Loading…
Reference in New Issue