Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #109701
    matdjon
    Participant

    Hi good day,

    For smart tree, is there any event that is fired when user started editing (after pressed F2) the tree label and also after user finished editing?

    If not, can I get a tip on how to implement this? I looked at the source (smart.tree.js) and found a function called _startEditing. I thought that possibly I can try to modify the source to add this functionality, but so far haven’t got an idea on how to do that.

    Thank you

    #109708
    matdjon
    Participant

    For event fired when user editing, I realized I can manually add event listener to input element with [smart-id = editInput]. When user started editing, I can use focus and when finished editing, blur can be used.

    My intention is to add icon or img to the side of smart tree, but when the label is edited, it will show full html element including the <i>icon</i>. I just want to edit the text. An example can be seen on this codepen. But of course, it will be better if this use case is officially supported.

    ps: my boss won’t let me use this code because as she said – “this is cheating”. She wanted to use something that is a proper implementation of smart tree itself.

    #109713
    Markov
    Keymaster

    Hi,

    The Tree will raise a change event after editing is finished.

    Best regards,
    Markov

    Smart UI team
    https://www.htmlelements.com/

    #109717
    matdjon
    Participant

    Understood Markov.

    but when the label is edited, it will show full html element including the <i>icon</i>

    Is there any plan to address this?

    #109722
    Markov
    Keymaster

    Hi matdjon,

    Could you send a sample of this?

    Best regards,
    Markov

    Smart UI team
    https://www.htmlelements.com/

    #109726
    matdjon
    Participant

    Hi Markov,

    You can compare this with my codepen.

    Try to edit the label in each demo.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.