mirror of
				https://github.com/ArthurSonzogni/FTXUI.git
				synced 2025-10-31 10:38:09 +08:00 
			
		
		
		
	Table: support initializer list constructor. (#915)
To avoid burdening the user with explicit type construction when using the library, we can use a constructor that accepts an initializer list (std::initializer_list). This allows users to pass initializer lists directly without having to wrap them in std::vector<std::vector<std::string>>. This resolves the ambiguous case when the inner list contains only two elements. Bug:https://github.com/ArthurSonzogni/FTXUI/issues/912
This commit is contained in:
		| @@ -38,6 +38,7 @@ class Table { | ||||
|   Table(); | ||||
|   explicit Table(std::vector<std::vector<std::string>>); | ||||
|   explicit Table(std::vector<std::vector<Element>>); | ||||
|   Table(std::initializer_list<std::vector<std::string>> init); | ||||
|   TableSelection SelectAll(); | ||||
|   TableSelection SelectCell(int column, int row); | ||||
|   TableSelection SelectRow(int row_index); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Arthur Sonzogni
					Arthur Sonzogni