Color invalid options grey in grids
This commit is contained in:
parent
de78f1a242
commit
1156209399
|
@ -13,6 +13,8 @@
|
|||
export let api
|
||||
export let contentLines = 1
|
||||
|
||||
const InvalidColor = "hsla(0, 0%, 70%, 0.3)"
|
||||
|
||||
let isOpen = false
|
||||
let focusedOptionIdx = null
|
||||
let anchor
|
||||
|
@ -40,7 +42,7 @@
|
|||
const getOptionColor = value => {
|
||||
let idx = value ? options.indexOf(value) : null
|
||||
if (idx == null || idx === -1) {
|
||||
idx = 0
|
||||
return InvalidColor
|
||||
}
|
||||
return OptionColours[idx % OptionColours.length]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue