File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
packages/ve-table/src/editor Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -179,6 +179,9 @@ export default {
179179 parentRendered : {
180180 handler : function ( val ) {
181181 if ( val ) {
182+ // fixed #471
183+ this . setTableEl ( ) ;
184+
182185 // add table container scroll hook
183186 this . hooks . addHook (
184187 HOOKS_NAME . TABLE_CONTAINER_SCROLL ,
@@ -197,7 +200,6 @@ export default {
197200 ) ;
198201 // add table size change hook
199202 this . hooks . addHook ( HOOKS_NAME . TABLE_SIZE_CHANGE , ( ) => {
200- this . setTableEl ( ) ;
201203 this . setTextareaPosition ( ) ;
202204 } ) ;
203205 }
@@ -239,8 +241,10 @@ export default {
239241 methods : {
240242 // set table element
241243 setTableEl ( ) {
242- const tableEl = this . $el . previousElementSibling ;
243- this . tableEl = tableEl ;
244+ this . $nextTick ( ( ) => {
245+ const tableEl = this . $el . previousElementSibling ;
246+ this . tableEl = tableEl ;
247+ } ) ;
244248 } ,
245249
246250 // set cell element
You can’t perform that action at this time.
0 commit comments