bbc / tal

TV Application Layer
http://bbc.github.com/tal
Other
559 stars 150 forks source link

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

Closed Arunprasanth closed 1 year ago

Arunprasanth commented 6 years ago

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 ?

Arunprasanth commented 6 years ago

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

kukulaka commented 1 year ago

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

Please see the deprecation notice.