New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gantt: Request for improved API for custom cell editors #7267
Comments
Slightly related: #73 |
Yes, we had to create a hack for that too, to allow controls to exceed the boundaries of the table cells. |
@matsbryntse Is this feature request something you can commit to and provide an estimate for expected availability? |
Thanks for your feedback, we'll try to address this later in Q3 or early Q4. |
Much appreciated - thank you 🙏😊 |
Hello @FlowIT-JIT, I'm working on this ticket and I would like to work with the same code as you do so would you please post your implementations of |
@jsakalos Great! I'll create some examples for you as soon as possible. I might be able to start working on it today. |
@jsakalos I have attached a runnable example to this comment Gantt-5.6.2-react-typescript-basic.zip It is not identical to what we have running, since it's a huge and very complex app, but it demonstrates the problems we are experiencing with the existing interface. The controls used for this demo are the ones we use. Thank you for involving us like this 👍 |
Hello @FlowIT-JIT, it finally breaks down to the focus management. The difference between Bryntum combo and your Color selector is that Bryntum combo stays in the editing mode while your Color component does not. The same is true is for your Date picker. The blur is caused by line 105 of
it seems working to me. Let us please know whether this is the behavior you are after. |
@jsakalos Hi - happy new year 😊 Yes, I'm aware. The point is, the current implementation does not allow us to focus anything outside of the cell hosting the control. That greatly limits what we can do without applying ugly hacks. We have very complex controls, some of which opens entirely new editing experiences "on top" of Gantt. The date picker works, but only because I have applied a dirty hack. Try to disable this line: Now reload, open a date picker, and try changing the month or year, or even select a visible date. The date picker's input field disappears because focus is temporarily lost from the cell, and any selection within the date picker is lost as well. Additionally, the calendar widget remains on the screen, as the control malfunctions when it is prematurely unmounted. |
Hello @FlowIT-JIT. Happy new year to you too. We have discussed it internally and we consider adding a logic that would allow to configure a custom focus/blur behavior of editors. Stay tune please, it should materialize soon. |
@jsakalos Wonderful - thanks 😊 |
@isglass Exciting 😊 Can you please add a link to the documentation for the new API? - Thanks |
@FlowIT-JIT the issue is resolved but it has not yet been released. With |
@jsakalos Wonderful - thank you 😊 |
Hi,
We use Gantt's ability to display custom cell editors for data manipulation. The API that allows for this is quite simple - something along the lines of:
Some of our controls open widgets that are mounted outside the table cell - e.g. dialogs, calendar widgets, pull down menus, etc. Interacting with these DOM elements result in gantt exiting edit mode. We have been able to get it to work by added control specific logic outside of the React control using gantt's beforeComplete event which detects the presence of various widgets in the DOM and then prevents gantt from exiting edit mode by returning false. But that's a hack, and having to implement this outside of our custom React cell editors is really not desirable nor logic.
All our controls know exactly when they are done, which is when they lose focus (and they don't lose focus when interacting with pull down menus, dialogs, calendar widgets, etc.). So what we are requesting is the ability to ask gantt not to handle "commits" for us, but let us do it manually instead. Example of such implementation:
The text was updated successfully, but these errors were encountered: