Skip to content

Commit

Permalink
merge: #743 from ginger/column-picker
Browse files Browse the repository at this point in the history
  • Loading branch information
alycejenni authored Jan 3, 2024
2 parents eb1fe69 + ba1cf50 commit 267c65c
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 27 deletions.
57 changes: 33 additions & 24 deletions ckanext/nhm/theme/assets/less/multisearch.less
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,30 @@
}
}

.term-editor,
.field-picker {
input {
border: @lighter-borders;
border-radius: @rounding;
}

select {
width: 100%;
min-height: unset !important;
height: unset;
border: @lighter-borders;
padding: 1.2px 2px 2px;
}

label {
margin-bottom: 0;

&::after {
content: none;
}
}
}

.term-editor {
@wrapSize: @lg;

Expand Down Expand Up @@ -462,31 +486,10 @@
}
}

label {
margin-bottom: 0;

&::after {
content: none;
}
}

.term-editor-block {
width: 300px;
}

select {
width: 100%;
min-height: unset !important;
height: unset;
border: @lighter-borders;
padding: 1.2px 2px 2px;
}

input {
border: @lighter-borders;
border-radius: @rounding;
}

& .comparison-types {
& input {
display: none;
Expand Down Expand Up @@ -528,10 +531,10 @@
padding: 10px 0;
}
}
}

.field-picker button {
margin-left: 2px;
}
.field-picker button {
margin-left: 2px;
}

.filter-buttons {
Expand All @@ -551,6 +554,11 @@
}
}

.header-picker {
min-width: 200px;
right: 0;
}

// MAIN FORM ---------------------------------------------------------------------------------------

.multisearch-form {
Expand Down Expand Up @@ -617,6 +625,7 @@
display: flex;
justify-content: center;
gap: 5px;

& > input,
& > label {
margin: 0;
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,12 @@
v-if="showFields"
:callback="addCustomHeader"
:resource-ids="resultResourceIds"
:classes="['floating']"
:classes="['floating', 'header-picker']"
v-dismiss="{
switch: 'showFields',
ignore: ['#show-fields-' + _uid],
}"
:selected-fields="headers.flat(1)"
></FieldPicker>
</transition>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ export default {
computed: {
...mapState('results', ['resultData']),
selectableFields() {
return this.fieldList.filter((f) => !this.selectedFields.includes(f));
const existingFields = this.selectedFields || []; // just in case it's null
return this.fieldList.filter((f) => !existingFields.includes(f));
},
},
methods: {
Expand Down

0 comments on commit 267c65c

Please sign in to comment.