I’m doing this with Ajax. Trying to start with an empty list of cards. Then get some JSON, and create new cards. It ‘works’ but doesn’t seem to display the new cards on a first go through.
Hopefully the code is semi human readable. Res is the results, each People is a Person and needs having info shoving into or updating an existing card, and board is the Kanban board:
If I call this twice in a row it works fine. If I call it once, and just wait for the next ajax call (it’s on a timer), it works fine. But the first time through the new cards are not displayed.
Not exactly. A column’s “status” property and a task’s “status” should be the same if you want to display the task in the column. In your demo column’s “id” is the same as “status”, but they can be different.
Ah yes, sorry I’m not talking about the ID property. I meant defining as in… how it’s referred to, how it’s identified. Just getting my head round the nomenclature - status:new in the demo read to me, incorrectly, as “a newly added card should have status set to new”.
(Despite the fact I’d already set status correctly elsewhere, hence the silly me!)
Yes, you can access configuration properties of any view via config object. And add() method is not the only method that allows to add items. For multiple data loading you can use parse() and load() methods or data/url properties:
Disabling will require setting event handlers that will block drag-n-drop and selection for the items. $css property in data item will allow to apply additional css class: