Our pure JavaScript Scheduler component


Post by prasath »

We have implemented cellClick mainly for the date resource cells in the timeline view to get the clicked cell date. Is it possible to disable cellClick in the resource column alone?
PFA video for your reference,

CellClick to disble in resource column alone.mp4
Cellclick disable in resource column
(6.04 MiB) Downloaded 6 times

Post by tasnim »

Hi,

You can just check with an if statement that if you're not clicking on the resource cell then log the date you've clicked. That way you'll only get the date when you click on the date cell.

Hope this helps.


Post by prasath »

Hi Tasnim,
We have used cellclick method to get details of particular cell along with date.The need is whether its possible to restrict click on resource cell columns alone since its not needed there as of now.If possible can you suggest a way to do this.


Post by marcio »

Hey prasath,

You can use the following snippet (please note that on the snippet the resource is mapped on name field, which could be different on your project)

listeners: {
        cellClick: ({ column }) => {
            if(column.field !== 'name') {
                console.log('click not resource column')
            }
        }
    }
Attachments
Screen Recording 2024-08-12 at 09.32.54.mov
(7.35 MiB) Downloaded 5 times

Best regards,
Márcio


Post by prasath »

Its working as expected marcio.Thanks


Post Reply