bbc / tal

TV Application Layer

Home Page:http://bbc.github.com/tal

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

is there any way to dynamically add data into a gird ?

Arunprasanth opened this issue · comments

I have a grid with 12 data (3 rows 4 columns) and I need to add few more items to the grid in some cases, I have tried to add the data using below code

 this.historyGrid._childWidgetOrder.push(null);
                   this.historyGrid.setWidgetAt(1,3, sampleWidget);

But when i dynamically add the items the output element of grid will not be null and it goes to the

if (this.outputElement && this._autoRenderChildren) {
                        var device = this.getCurrentApplication().getDevice();

                        if (!widget.outputElement) {
                            widget.render(device);
                        }

                        device.appendChildElement(this.outputElement, widget.outputElement);
                    }

render method of the particular widget instead of render method defined in the grid and the dom tree looks like below
capture
All the dynamically added items are directly placed into the dom, they are not coming under the next row.

is there any way to fix this issue ?

To solve the above issue I have created my own custom grid , with vertical carousel and horizontal list.

We have deprecated this project and there are no plans for active development going forward.

Please see the deprecation notice.