All articles
Contents

    TypeScript SDK and React Client Updates

    @observer
    class CarList extends React.Component {

    carsData = collection<Car>(Car.NAME, {view: 'car-view', sort: '-updateTs'});

    render() {
    if (this.carsData.status === "LOADING") {
    return 'Loading...';
    }

    return (
      &lt;ul&gt;
        {this.carsData.items.map(car =&gt;
           &lt;li&gt;{car._instanceName}&lt;/li&gt;
        )}
      &lt;/ul&gt;
    )
    

    }

    carsDc = collection<Car>(Car.NAME, {view: 'car-view', sort: '-updateTs'});

    render() {
    return(
    <DataTable dataCollection={this.carsDc}
    fields={['manufacturer','model','regNumber','purchaseDate','carType']}
    defaultSort={'-updateTs'}
    />
    )
    }

    Jmix is an open-source platform for building enterprise applications in Java