React-diagrams: How to get selected Widget model infos and disable "backspace delete"

Created on 19 Jul 2019  路  1Comment  路  Source: projectstorm/react-diagrams

Hi, I have 2 questions actually.

  • [ ] Is there any way to get the model information from the selected widget?

  • [ ] And is anyway to remove the "backspace delete" from the diagram (I'm using TextInput inside node, and every time I try to delete some word, it delete the entire node)?

question

Most helpful comment

  1. You can get all selected items by calling 'getSelectedItems' on the model.

  2. You can remove the key binding that deletes items by setting the deleteKeys prop to an empty array in the DiagramWidget component:

<DiagramWidget
    {...diagramProps}
    // disables delete on backspace keyUp event
    deleteKeys={[]}
/>

>All comments

  1. You can get all selected items by calling 'getSelectedItems' on the model.

  2. You can remove the key binding that deletes items by setting the deleteKeys prop to an empty array in the DiagramWidget component:

<DiagramWidget
    {...diagramProps}
    // disables delete on backspace keyUp event
    deleteKeys={[]}
/>
Was this page helpful?
0 / 5 - 0 ratings

Related issues

abhijitnandy2011 picture abhijitnandy2011  路  3Comments

Naveenraj006 picture Naveenraj006  路  3Comments

ganesh-sankey picture ganesh-sankey  路  4Comments

affanshahid picture affanshahid  路  3Comments

shortwavedave picture shortwavedave  路  3Comments