ReadOnly row depends on "available" checkbox
by handsoncode
HTML
<div id="example"></div>
<script src="https://cdn.jsdelivr.net/npm/handsontable@latest/dist/handsontable.full.min.js"></script>
<link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/handsontable@latest/dist/handsontable.full.min.css">
CSS
.handsontable td.highlightCell {
background-color: #eee;
}
Babel + JSX
const OPTIONS = new Map([
['2015', () => ['Jack', 'Bob', 'Same']],
['2016', () => ['WW', 'Saddy', 'Caven']],
['2017', () => ['VC', 'Pob', 'DJ', 'Saro']],
]);
const example = document.getElementById('example');
const hot = new Handsontable(example, {
data: [
{
car: "Mercedes A 160",
year: '2014',
ownersByYear: {2013: 'Micheal Pattinson', 2014: 'John Smith', 2015: 'James Anthon'},
owner: 'John Smith',
cleared: false
},
{
car: "Citroen C4 Coupe",
year: '2015',
ownersByYear: {2013: 'Micheal Pattinson', 2014: 'John Smith', 2015: 'James Anthon'},
owner: 'James Anthon',
cleared: false
},
{
car: "Audi A4 Avant",
year: '2017',
ownersByYear: {2013: 'Andrew Sanchez', 2014: 'John Smith', 2015: 'James Anthon'},
owner: 'James Anthon',
cleared: true
},
{
car: "Opel Astra",
year: '2016',
ownersByYear: {2013: 'John Smith', 2014: 'Micheal Pattinson', 2015: 'Andrew Sanchez'},
owner: 'John Smith',
cleared: false
},
{
car: "BMW 320i Coupe",
year: '2017',
ownersByYear: {2013: 'Andrew Sanchez', 2014: 'John Smith', 2015: 'Micheal Pattinson'},
owner: 'Andrew Sanchez',
cleared: true
},
{
car: "Skoda Octavia",
year: '2015',
ownersByYear: {2013: 'Andrew Sanchez', 2014: 'John Smith', 2015: 'Micheal Pattinson'},
owner: 'Micheal Pattinson',
cleared: true
},
{
car: "Hyundai Coupe",
year: '2015',
ownersByYear: {2013: 'Andrew Sanchez', 2014: 'John Smith', 2015: 'Micheal Pattinson'},
owner: 'Micheal Pattinson',
cleared: true
},
{
car: "Peugeot 407",
year: '2016',
ownersByYear: {2013: 'Andrew Sanchez', 2014: 'John Smith', 2015: 'Micheal Pattinson'},
owner: 'John Smith',
cleared: false
},
{
car: "BMW Z3",
year: '2015',
ownersByYear: {2013: 'Micheal Pattinson', 2014: 'John...