Page 1 of 1

Task Board | update columns Store dynamically

Posted: Thu Dec 30, 2021 8:24 pm
by Gaetek

Hello!

I am using the Task Board React component but I am not able to update the column store dynamically.

g.columns.removeAll();
g.columns.add(columns);

"g" here is a reference to the Taskboard instance and columns is an array of objects with id and text

Unfortunately the UI doesn't reflect the changes and doesn't update itself with the new columns. I need to force the update of the component but I don't know how to do that

Thanks for the hard work


Re: Task Board | update columns Store dynamically

Posted: Fri Dec 31, 2021 9:44 am
by Animal

This works. If g is actually an instanceof Taskboard.view.TaskBoard

changecolumns.mp4
(1.09 MiB) Downloaded 101 times

Re: Task Board | update columns Store dynamically

Posted: Mon Jan 03, 2022 4:53 pm
by Gaetek

Thanks for the reply and the video!
I am using the react component in my project so "g" is this thing right here:

// this is pseudo code

let grid = ref || createRef();
let g = grid.current.instance;
...
 <BryntumTaskBoard
            ref={grid}
	...more props
        />

When I inspect the taskboard instance in the console, I can see that the columns data is changed but that change is not reflected by the UI


Re: Task Board | update columns Store dynamically

Posted: Mon Jan 03, 2022 9:07 pm
by mats

Could you please provide a small test case?


Re: Task Board | update columns Store dynamically

Posted: Tue Jan 04, 2022 7:22 am
by Animal

When you set a breakpoint at g.columns = and step in what do you see?