Color invalid options grey in grids
This commit is contained in:
parent
de78f1a242
commit
1156209399
1 changed files with 3 additions and 1 deletions
|
@ -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 a new issue