8
0
Просмотр исходного кода

Docs: Updated the UI library guide with the latest addListToDropdown API.

Aleksander Nowodzinski 7 лет назад
Родитель
Сommit
c444de6bdc
1 измененных файлов с 9 добавлено и 2 удалено
  1. 9 2
      docs/framework/guides/architecture/ui-library.md

+ 9 - 2
docs/framework/guides/architecture/ui-library.md

@@ -335,8 +335,15 @@ const dropdownView = createDropdown( locale );
 // The collection of the list items.
 const items = new Collection();
 
-items.add( new Model( { label: 'Foo' } ) );
-items.add( new Model( { label: 'Bar' } ) );
+items.add( {
+	type: 'button',
+	model: new Model( { label: 'Foo' } )
+} );
+
+items.add( {
+	type: 'button',
+	model: new Model( { label: 'Bar' } )
+} );
 
 // Create a dropdown with a list inside the panel.
 addListToDropdown( dropdownView, items );