Skip to content

Commit

Permalink
Jamie remove visibility toggle from config table (#2824)
Browse files Browse the repository at this point in the history
Co-authored-by: Yohann Paris <github@yohannparis.com>
  • Loading branch information
jamiewaese-uncharted and YohannParis authored Feb 27, 2024
1 parent 8ac9834 commit 64770f4
Showing 1 changed file with 21 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
size="small"
:class="{ 'hide-header': hideHeader }"
>
<Column expander style="width: 5rem" />
<Column expander style="width: 2%" />
<Column field="id" header="ID" style="width: 10%"></Column>
<Column field="name" header="Name" style="width: 15%"></Column>
<Column field="type" header="Value type" style="width: 15%">
Expand All @@ -23,7 +23,7 @@
<span v-else-if="slotProps.data.type === ParamType.EXPRESSION">Expression</span>
<Dropdown
v-else
class="value-type-dropdown"
class="value-type-dropdown w-8"
:model-value="slotProps.data.type"
:options="typeOptions"
optionLabel="label"
Expand All @@ -33,7 +33,7 @@
/>
</template>
</Column>
<Column field="value" header="Value" style="width: 15%">
<Column field="value" header="Value" style="width: 10%">
<template #body="slotProps">
<span
v-if="slotProps.data.type === ParamType.MATRIX"
Expand All @@ -44,6 +44,7 @@
<span v-else-if="slotProps.data.type === ParamType.EXPRESSION">
<InputText
size="small"
class="tabular-numbers w-full"
v-model.lazy="slotProps.data.value.expression"
@update:model-value="updateExpression(slotProps.data.value)"
/>
Expand Down Expand Up @@ -78,6 +79,7 @@
<span v-else-if="slotProps.data.type === ParamType.CONSTANT">
<InputNumber
size="small"
class="constant-number w-full"
inputId="numericInput"
mode="decimal"
:min-fraction-digits="1"
Expand Down Expand Up @@ -163,7 +165,7 @@ import { cloneDeep } from 'lodash';
const typeOptions = [
{ label: 'Constant', value: ParamType.CONSTANT },
{ label: 'Distribution', value: ParamType.DISTRIBUTION },
{ label: 'Time Varying', value: ParamType.TIME_SERIES }
{ label: 'Time varying', value: ParamType.TIME_SERIES }
];
const props = defineProps<{
modelConfiguration: ModelConfiguration;
Expand Down Expand Up @@ -299,13 +301,25 @@ const updateExpression = async (value: Initial) => {
}
.distribution-item > :deep(input) {
width: 4rem;
width: 100%;
font-feature-settings: 'tnum';
font-size: var(--font-caption);
text-align: right;
}
.constant-number > :deep(input) {
font-feature-settings: 'tnum';
font-size: var(--font-caption);
text-align: right;
}
.tabular-numbers {
font-feature-settings: 'tnum';
font-size: var(--font-caption);
text-align: right;
}
.invalid-message {
color: var(--text-color-danger);
font-size: var(--font-caption);
}
.timeseries-container {
display: flex;
flex-direction: column;
Expand Down

0 comments on commit 64770f4

Please sign in to comment.