Id Name Status Action
701 Rich Raccoon
702 Elated Eland
703 Frantic Flatworm
704 Grieving Gnat
705 Itchy Ibex
706 Lair of the Tank Police
707 Ancient Chocobo Disaster
708 Tactical Hitman Power
709 Communist Mahjong Agent
710 Curse of the Mafia DJ
711 Dangerous Matador Competition
712 Beautiful Transvestite Machine
713 Happy Hawk
714 Cute Cormorant
715 Interstellar Toon Tale
716 Jittery Jackal
717 Leisure Suit Grizzly Bear - Total War
718 Curious Crossbill
719 Yellowed Yak
720 Catholic Pokemon 3D
( Items: 701 - 720 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;
}