LT-275: Creating final measure flow using selectTree component
This commit is contained in:
1 parent
fe8d256037
commit
795d1bfeba
6 files changed
+86
-1
No files matched your search
@@ -0,0 +1,12 @@
|
||||
<template name="measureFlow">
|
||||
<div class="measure-flow">
|
||||
<button>Add label</button>
|
||||
{{>selectTree
|
||||
key='label'
|
||||
items=instance.items
|
||||
label='Assign label'
|
||||
searchPlaceholder='Search labels'
|
||||
storageKey='measureLabelCommon'
|
||||
}}
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,50 @@
|
||||
Template.measureFlow.onCreated(() => {
|
||||
const instance = Template.instance();
|
||||
|
||||
const items = [
|
||||
'Adrenal',
|
||||
'Bladder',
|
||||
'Bone',
|
||||
'Brain',
|
||||
'Breast',
|
||||
'Colon',
|
||||
'Esophagus',
|
||||
'Extremities',
|
||||
'Gallbladder',
|
||||
'Kidney',
|
||||
'Liver',
|
||||
'Lung',
|
||||
'Lymph Node',
|
||||
'Muscle',
|
||||
'Neck',
|
||||
'Other: Soft Tissue',
|
||||
'Ovary',
|
||||
'Pancreas',
|
||||
'Pelvis',
|
||||
'Peritoneum/Omentum',
|
||||
'Prostate',
|
||||
'Retroperitoneum',
|
||||
'Small Bowel',
|
||||
'Spleen',
|
||||
'Stomach',
|
||||
'Subcutaneous'
|
||||
];
|
||||
|
||||
instance.items = [];
|
||||
_.each(items, item => {
|
||||
instance.items.push({
|
||||
label: item,
|
||||
value: item
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Template.measureFlow.events({
|
||||
'click .tree-leaf input'(event, instance) {
|
||||
console.warn('>>>>event', event);
|
||||
const $label = $(event.currentTarget).closest('label');
|
||||
const $container = $label.closest('.select-tree-root').find('.tree-options:first');
|
||||
const top = $label.position().top;
|
||||
$container.scrollTop(top);
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
.measure-flow
|
||||
|
||||
.select-tree-root>.tree-content>.tree-options
|
||||
margin-right: -20px
|
||||
max-height: 250px
|
||||
overflow-x: hidden
|
||||
overflow-y: scroll
|
||||
position: relative
|
||||
z-index: 2
|
||||
|
||||
.tree-inputs
|
||||
position: relative
|
||||
Reference in new issue
Block a user