Premium support for our pure JavaScript UI components


Post by plugins-welcome »

Hi,

We have a scenario where we have a swap button, which swaps the values of the selected columns and swimlanes. Both columns and swimlanes are changed at the same time.
When we try to perform that operation, we get the attached error.
Updating the "getColumnTasks" to this:

const set = taskStore.storage.findItem(me.columnField, columnRecord.id);
const foundItems = !set || set instanceof Set ? set : new Set([set]);
const tasks = foundItems ? [...foundItems] : [];

fixed the issue.

Can you please look into the issue?

Attachments
set is not iterable error.jpg
set is not iterable error.jpg (69.92 KiB) Viewed 188 times

Post by mats »

How can we reproduce this? Can you reproduce it easily in our online samples?


Post by plugins-welcome »

A quick example:

https://bryntum.com/examples/taskboard/swimlanes/

Updated the code there to add a new swap button and just swapped the values.

onSwapClick() {
  taskBoard.swimlanes = [
    {id: 'todo', text: 'todo'},
    {id: 'doing', text: 'doing'},
    {id: 'review', text: 'review'},
    {id: 'done', text: 'done'}
  ];
 
  taskBoard.columns =  [
    { id : 'critical', text : 'Critical!!', color : 'red' },
    { id : 'high', text : 'High', color : 'deep-orange' },
    { id : 'medium', text : 'Medium', color : 'orange' }
  ];

  taskBoard.columnField = 'prio';
  taskBoard.swimlaneField = 'status';
 }

However, if I update the function to just change columns or swimlanes alone, it works.


Post by marcio »

Hey plugins-welcome,

Thanks for the example, I created a ticket for fixing it https://github.com/bryntum/support/issues/5276

Best regards,
Márcio


Post by plugins-welcome »

Thanks!


Post Reply