-
Notifications
You must be signed in to change notification settings - Fork 69
Conversation
updateTitle, | ||
makeEditable, | ||
editTitle, | ||
deactivate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like adding above props, any suggestions on how to refactor this?
onKeyUp={ev => this.handleKeypress(ev)} | ||
ref={input => { | ||
this.titleInput = input | ||
}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can i do it without having to use ref
?
Why did you implement this yourself, rather than using an existing component such as https://github.com/kaivi/riek ? |
@martinheidegger Hm, that's good point.... I will go through that library and ones like that to see if they would be good fit and refactor it with them |
@martinheidegger I looked into it and libraries like this one for react. This one seem to be most mature, but there are certain problems with it when it comes to our usage. There is no way to tell if RIEInput is selected or clicked upon, hence we can't tell if we are already in editing mode and we should show the I think we should first get it working and write our own library to replace the refs eventually |
If it doesn't work, it doesn't work - thank you for giving it a try: It seems like |
Yes I also found few, I am closing it and push a branch and make a pr again. Still working on it.... |
Note: Its okay to force-push to a PR branch. 😉 |
Right :D but I thought I would push it upstream and make a pr from there. Also I didn't know about the pattern we used for table row refactor, now I can use that to make this one more clearer.. and some relatively better naming. So i thought it would be okay to make entirely separate PR 🤔 |
No description provided.