naotiki / axcel

Axcel
4 stars 0 forks source link

データに対応したカスタム背景色 #6

Open naotiki opened 4 months ago

naotiki commented 4 months ago

データに不備などがあることを示すために、データの値によって色を変化させる。

a.model({...}).computedStyles([{
  compute(column):boolean{
    return column.state === State.Wrong
  }
  row:{
    backgroundColor: "#ff0000"
  }
}])
a.model({...}).computedStyles([{
  compute(column):boolean{
    return column.state === State.Wrong
  }
  state:{//セルに適応させるときはRowの名前
    backgroundColor: "#ff0000"
  }
}])

should: rowを予約語に指定する