File tree Expand file tree Collapse file tree 2 files changed +0
-27
lines changed
js/__internal/grids/new/grid_core
testing/tests/DevExpress.ui.widgets.dataGrid Expand file tree Collapse file tree 2 files changed +0
-27
lines changed Original file line number Diff line number Diff line change @@ -34,17 +34,6 @@ export function normalizeToolbarItems(
3434 userItems : ( ToolbarItem | string ) [ ] | undefined ,
3535 defaultItemNames : readonly string [ ] ,
3636) : ToolbarItem [ ] {
37- // TO DO: We need to discuss about this error. It may need to be removed.
38- /*
39- defaultItems.forEach((button) => {
40- if (!defaultItemNames.includes(button.name)) {
41- throw new Error(
42- `Default toolbar item '${button.name}' is not added to DEFAULT_TOOLBAR_ITEM_NAMES`
43- );
44- }
45- });
46- */
47-
4837 if ( ! isDefined ( userItems ) ) {
4938 return defaultItems ;
5039 }
Original file line number Diff line number Diff line change @@ -938,20 +938,4 @@ QUnit.module('Draw buttons in header panel', {
938938 assert . strictEqual ( $customToolbarItem . length , 1 , 'item is rendered' ) ;
939939 assert . ok ( $customToolbarItem . is ( ':visible' ) , 'item is visible' ) ;
940940 } ) ;
941-
942- QUnit . test ( 'The error should be raised if new default toolbar item is not added to DEFAULT_TOOLBAR_ITEM_NAMES' , function ( assert ) {
943- // arrange
944- const headerPanel = this . headerPanel ;
945- const $testElement = $ ( '#container' ) ;
946-
947- // act
948- headerPanel . _getToolbarItems = ( ) => [ { name : 'new' } ] ;
949-
950- assert . throws ( function ( ) {
951- headerPanel . init ( ) ;
952- headerPanel . render ( $testElement ) ;
953- } , function ( e ) {
954- return e . message === 'Default toolbar item \'new\' is not added to DEFAULT_TOOLBAR_ITEM_NAMES' ;
955- } , 'exception' ) ;
956- } ) ;
957941} ) ;
You can’t perform that action at this time.
0 commit comments