[BUG]: Unable to Select Cell in Report when clicking on the Cell

Open
#108 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript
Domain
frontend

Research direction

Reproduce the problem by clicking a cell in a report and inspect the console error. Start with clearSelection, focusCell, and bindMouseEvents in frappe-datatable.cjs.js, then follow the render_datatable entry point in query_report.js. Done means report cells can be selected without the $cell is null error.

Written by the indexing model from the issue text.

Description

Unable to click on the cell of a report its not getting selected. The issue is coming on the js console as well and the console error is below:

Uncaught TypeError: $cell is null
    clearSelection frappe-datatable.cjs.js:2910
    clearSelection frappe-datatable.cjs.js:2910
    focusCell frappe-datatable.cjs.js:2741
    bindMouseEvents frappe-datatable.cjs.js:2684
    delegate frappe-datatable.cjs.js:74
    delegate frappe-datatable.cjs.js:70
    on frappe-datatable.cjs.js:55
    bindMouseEvents frappe-datatable.cjs.js:2682
    bindEvents frappe-datatable.cjs.js:2553
    CellManager frappe-datatable.cjs.js:2545
    initializeComponents frappe-datatable.cjs.js:5609
    DataTable frappe-datatable.cjs.js:5556
    render_datatable query_report.js:750
    refresh query_report.js:609
    promise callback*refresh query_report.js:557
    throttle desk.min.js:5070
    onchange query_report.js:480
    set base_control.js:158
    promise callback*frappe.run_serially/< desk.min.js:1004
    run_serially desk.min.js:1002
    set base_control.js:151
    validate_and_set_in_model base_control.js:173
    parse_validate_and_set_in_model base_control.js:141
    setup_awesomeplete link.js:229
    jQuery 8
    make_input link.js:39
    Class.extend/proto[name]</< desk.min.js:65
    make_input base_input.js:60
    refresh_input base_input.js:87
    refresh base_control.js:85
    add_field desk.min.js:6850
    filters query_report.js:450
    setup_filters query_report.js:447
    refresh_report query_report.js:338
    promise callback*frappe.run_serially/< desk.min.js:1004
    run_serially desk.min.js:1002
    refresh_report query_report.js:337
    load_report query_report.js:130
frappe-datatable.cjs.js:2910:27

Let me know if more details for the error are needed.

Dominant language
JavaScript
Stars
1.3k
Forks
223
Avg merge
23h 14m
Merged PRs (30d)
1

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from frappe/datatable

All issues in frappe/datatable

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.