Keep edit cell and cell selection open after click event

Posted by: jeff on 4 September 2019, 8:32 am EST

    • Post Options:
    • Link

    Posted 4 September 2019, 8:32 am EST

    The edit cell box has the added feature of selecting cells in the grid to populate the edit box with a cell addresses. Spread JS also allows you to change sheets and select cell on other sheets. Unfortunately click events outside spreadjs closes the edit cell and cell selection mode.

    I need to keep cell selection and edit cell mode alive during outside click events.

    https://codepen.io/jeffaj/pen/ZEzaMqL

  • Posted 4 September 2019, 9:22 pm EST

    Hi Jeff,

    We have escalated this case to the dev team. Internal tracking Id for the issue is SJS-1616. We will let you know about any updates regarding the same.

    Regards

    Sharad

  • Posted 5 September 2019, 1:34 pm EST

    Sharad,

    Great. This is a critical issue for our team. Cell selection edit mode is important to our product. Please keep us informed and feel free to reach out if you need more clarity.

    Sincerely,

    Jeff

  • Posted 5 September 2019, 5:20 pm EST

    We are currently discussing this case with the dev team and will keep you notified with any updates.

    In the sample you shared, the buttons are used to change the active sheet, could you please confirm if this is the actual functionality you need on the external button or are they supposed to perform some different action. Also please let us know the spread version you are using.

  • Posted 11 September 2019, 10:09 am EST

    This is exactly what we need. A way for the cell selection mode to stay active when I click outside the Spreadjs div in the DOM.

  • Posted 11 September 2019, 10:09 am EST

  • Posted 11 September 2019, 12:47 pm EST

    Spread.Sheets Library 12.2.0

  • Posted 11 September 2019, 9:38 pm EST

    Hi Jeff,

    Thank you for the confirmation, we are sorry but this feature (change activeSheet using the external buttons while preserving the edit state) is not supported.

    However, if you just want to handle the click event on external buttons during the edit and not change then the active sheet, then you could do so by handling the EditEnding event. Please refer to the following sample demonstrating the same:

    https://codesandbox.io/s/spread-js-starter-oi1wf

  • Posted 12 September 2019, 4:56 am EST

    Awesome,

    This almost works. There is a bug! I modified your code pen to change sheets when the outside buttons are clicked. The EditEnding event and “args.cancel = true;” pattern prevents the edit box from closing. Unfortunately it only works the first time. When I click an outside button a second time the dialogue closes.

    Steps:

    1. Start a foruma by typing “=SUM(” into a cell.
    2. Click the Sheet2 button outside
    3. Click the Sheet3 button outside

    It seems the EditEnding event stops firing after a sheet is changed. This prevents the user from selected cells in a formula across multiple sheets.

    https://codesandbox.io/s/spread-js-starter-v1qkg

  • Posted 12 September 2019, 5:10 pm EST

    We are sorry but as I mentioned in the previous reply it is not possible to keep the cell in edit mode while changing active sheets using the external buttons. It conflicts with our internal editor’s life cycle.

    Further could you please let us know about your use case that why you want to change active sheet using external buttons and keep the cell in edit mode?

  • Posted 16 September 2019, 3:18 am EST

    I will contact sales with this information and reference this post.

  • Posted 27 September 2019, 12:04 pm EST

    I’m created a custom tab bar to meet our UX needs.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels