move important stuff up top
This commit is contained in:
parent
00d5857232
commit
892bac9808
|
@ -12,6 +12,15 @@ const renderers = new Map([
|
||||||
["options", optionsRenderer],
|
["options", optionsRenderer],
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
export function getRenderer(type, options) {
|
||||||
|
if (renderers.get(type)) {
|
||||||
|
return renderers.get(type)(options)
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function booleanRenderer(options) {
|
function booleanRenderer(options) {
|
||||||
return params => {
|
return params => {
|
||||||
const toggle = (e) => {
|
const toggle = (e) => {
|
||||||
|
@ -47,6 +56,8 @@ function dateRenderer(options) {
|
||||||
params.setValue(e.detail[0][0])
|
params.setValue(e.detail[0][0])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Options need to be passed in with minTime and maxTime! Needs bbui update.
|
||||||
|
|
||||||
const datePickerInstance = new DatePicker({
|
const datePickerInstance = new DatePicker({
|
||||||
target: container,
|
target: container,
|
||||||
props: {
|
props: {
|
||||||
|
@ -81,11 +92,3 @@ function optionsRenderer({ inclusion }) {
|
||||||
return container
|
return container
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getRenderer(type, options) {
|
|
||||||
if (renderers.get(type)) {
|
|
||||||
return renderers.get(type)(options)
|
|
||||||
} else {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue