Skip to content

Commit

Permalink
fix: better field group open
Browse files Browse the repository at this point in the history
Don't open on checkbox hover, smaller paddings in popup
  • Loading branch information
popstas committed Aug 21, 2020
1 parent cd0b665 commit 78d5b8b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
15 changes: 7 additions & 8 deletions components/FieldGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
<div class="field-group" :id="'filter-' + group.name">
<!-- group header -->
<div class="field-group__header">
<input
type="checkbox"
:checked="groupChecked"
@click="setPreset({name: 'all', columns: [...[$store.state.defaultField],...group.fields.map(f => f.name)]});"
:title="'Вывести колонки:\n' + group.fields.map(f => f.comment).join('\n')"
>

<el-dropdown>
<span class="el-dropdown-link" @click="changeGroupOpened">
<input
type="checkbox"
:checked="groupChecked"
@click="setPreset({name: 'all', columns: [...[$store.state.defaultField],...group.fields.map(f => f.name)]});"
:title="'Вывести колонки:\n' + group.fields.map(f => f.comment).join('\n')"
>
<span class="field-group__name">{{ group.name }}</span>
<i class="el-icon-arrow-down el-icon--right"></i>
</span>
Expand All @@ -21,15 +22,13 @@
>
<ColumnPresetButton :preset="preset" @click="setPreset(preset);"></ColumnPresetButton>
</el-dropdown-item>

<el-dropdown-item
v-for="preset in filterPresets"
:key="preset.name"
v-if="preset.groups.indexOf(group.name) !== -1"
>
<FilterPresetButton :preset="preset"></FilterPresetButton>
</el-dropdown-item>

<el-dropdown-item v-for="field in group.fields" :key="field.name">
<ColumnField
:field="field"
Expand Down
4 changes: 4 additions & 0 deletions pages/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@
}
}

.el-dropdown-menu__item {
padding: 0 0;
}

.available-fields {
margin: 0 auto;
text-align: left;
Expand Down

0 comments on commit 78d5b8b

Please sign in to comment.