File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -88,7 +88,8 @@ public function getButtons(): array
8888 return [
8989 $ this ->buttonFactory ->createCloseAction (),
9090 $ this ->buttonFactory ->createSaveCloseAction (),
91- //$this->buttonFactory->createSaveContinueAction(), // @todo: This looses current changes when creating a new item
91+ // @todo: This looses current changes when creating a new item
92+ //$this->buttonFactory->createSaveContinueAction(),
9293 ];
9394 }
9495
Original file line number Diff line number Diff line change @@ -150,12 +150,20 @@ public function getJsComponentName(): ?string
150150
151151 public function getJsData (): array
152152 {
153+ $ columns = $ this ->getColumns ();
154+ $ stateData = $ this ->getState ()->toArray ();
155+ if (empty ($ stateData ['activeColumns ' ])) {
156+ foreach ($ columns as $ column ) {
157+ $ stateData ['activeColumns ' ][] = $ column ->getCode ();
158+ }
159+ }
160+
153161 return [
154162 ...parent ::getJsData (),
155- ...$ this -> getState ()-> toArray () ,
163+ ...$ stateData ,
156164 'namespace ' => $ this ->getNamespace (),
157165 'gridFilters ' => $ this ->getGridFilterStateValues (),
158- 'columns ' => $ this -> getColumns () ,
166+ 'columns ' => $ columns ,
159167 'columnPositions ' => $ this ->getColumnPositions (),
160168 'newUrl ' => $ this ->getNewUrl (),
161169 'indexUrl ' => $ this ->getIndexUrl (),
You can’t perform that action at this time.
0 commit comments