Hello,
I am working on table of “profs” that can have severals “sections” to teach to. I would like the sections to appear as tag in the cell with an autocomplete type of cell. The data has a prof “name” column and a “sections” column, an array of objects.
I setup a jsfiddle here : https://jsfiddle.net/Nico_L/pjemhxak/78/
I have code a renderer cell to transform the array of object into span elements to be rendered as tags
I have started to code a MyAutocomplete editor class to handle things:
- open() transforms the sections of array into a string of the sections.title elements separated by a comma
- getValue() transform the string back into an array of elements for the sections column
- setValue() allows to get the right format when an element is chosen from the list by a mouse click
the idea for the user is to enter the sections separated by a comma and the source list is getting filter for each section like this:
When the cell is empty, the source list appears correctly but I have not succeeded in making it appear after a comma. I tried to change the context query (this.query) in various places with no success. I looked to the source code of the autocomplete code but still have not clue how to make the list appears after a comma is added.
How could I modify the query to only the part after the last comma so that the autocomplete starts again?
Thanks,
Nicolas