How to use tubular-react-common - 3 common examples

To help you get started, we’ve selected a few tubular-react-common 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 unosquare / tubular-react / sample / src / TbListExample.tsx View on Github external
const TbListExample: React.FunctionComponent = () => {
  const [data, setData] = React.useState(localData);
  const tbList = useTbList(
    columns,
    'https://tubular.azurewebsites.net/api/orders/paged',
  );

  const rowClick = (row: any) => {
    console.log('You clicked on a row: ', row);
  };

  const handleAddRow = () => {
    setData([...data, {
      Amount: 150.00,
      CustomerName: 'Tiempo Development',
      OrderID: 23,
      ShippedDate: '2016-01-04T18:00:00',
      ShipperCity: 'Monterrey, NL, Mexico',
    }]);
github unosquare / tubular-react / src / TbList / TbList.tsx View on Github external
const rowRenderer = (props: any) => {
        const { index, key, style } = props;
        const row = items[index];
        const itemClickProxy = generateOnRowClickProxy(onItemClick)(row);
        const isPlaceholder = !isItemLoaded(index) || !items[index];
        const itemToRender = (
            
        );

        const placeholderItem = placeholderStyle => {
            const placeholderMessage = noRecordsFound ? 'No records found' : 'Loading...';
            return (
github unosquare / tubular-react / src / DataGrid / DataGrid.tsx View on Github external
deps,
        footerComponent,
        gridName,
        mobileBreakpointWidth = props.mobileBreakpointWidth || 800,
        onError,
        onRowClick,
        rowComponent,
        rowMobileComponent,
        storage,
        toolbarOptions = props.toolbarOptions || new ToolbarOptions(),
        detailComponent,
    } = props;

    const classes = useStyles({});

    const tbTableInstance = useTbTable(columns, dataSource, {
        callbacks: { onError },
        componentName: gridName,
        deps,
        pagination: {
            itemsPerPage: toolbarOptions.itemsPerPage,
        },
        storage,
    });

    const [isMobileResolution] = useResolutionSwitch(mobileBreakpointWidth, timeout);

    if (isMobileResolution) {
        toolbarOptions.SetMobileMode();

        return (

tubular-react-common

Unosquare Tubular React Common

MIT
Latest version published 5 months ago

Package Health Score

68 / 100
Full package analysis

Similar packages