Id Name Status Action
821 Legacy of City Ultra
822 Micro Princess Returns
823 Confused Camel
824 Grieving Goose
825 Expensive Eel
826 Bling Bling Chef Derby
827 Relieved Rattlesnake
828 Smoggy Skylark
829 Annoying Angelfish
830 Gleaming Goosander
831 Colonial Shopping Park
832 Xenophobic Xenomorph
833 Inquisitive Ibis
834 Kind Katipo
835 Ho-Hum Cowboy Deluxe
836 Deadly Snowboard Strike Force
837 Shiny Seahorse
838 Energetic Eel
839 Bored Bee
840 Soviet Soccer Daredevils
( Items: 821 - 840 from 1020 )
  See the code below 👇 or see GitHub
public function createComponentGrid(): DataGrid
{
	$grid = new DataGrid();

	$grid->setDataSource($this->dibiConnection->select('*')->from('users'));

	$grid->setItemsPerPageList([20, 50, 100]);

	$grid->addColumnNumber('id', 'Id')
		->setAlign('start')
		->setFilterText();

	$grid->addColumnText('name', 'Name')
		->setFilterText();

	$grid->addColumnStatus('status', 'Status');

	$inlineAdd = $grid->addInlineAdd();

	$inlineAdd->setPositionTop()->onControlAdd[] = function ($container): void {
		$container->addText('name', '')
			->setRequired('aaa');
		$container->addText('birth_date', '');
		$container->addText('link', '');
		$container->addSelect('status', '', [
			'active' => 'Active',
			'inactive' => 'Inactive',
			'deleted' => 'Deleted',
		]);
	};

	$inlineAdd->onSubmit[] = function ($values): void {
		$this->dibiConnection->insert(
			'users',
			[
				'name' => $values['name'],
				'status' => $values['status'],
				'countries_visited' => 1,
				'birth_date' => new DateTime(),
			]
		)->execute();
		$this->flashMessage('Record was added!', 'success');
		$this->redrawControl('flashes');
	};

	return $grid;
}