How to use the devextreme/data/data_source function in devextreme

To help you get started, we’ve selected a few devextreme examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DevExpress / devextreme-react / example / list-example.tsx View on Github external
constructor(props: any) {
        super(props);
        this.state = {
            text: "",
            items
        };

        this.dataSource = new DataSource(
            {
                store: {
                    type: "array",
                    data: items
                },
                sort: [
                    { getter: "text", desc: true}
                ],
                pageSize: 1
            }
        );

        this.updateText = this.updateText.bind(this);
        this.addTextToList = this.addTextToList.bind(this);
    }