Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite7565a1

Browse files
committed
Fixed#258 : Incorrect Behavior of 'Add All' and 'Del All' Buttons in Subset App
Ensure Proper Sorting of Items after 'Del All' Operation
1 parentcfbc858 commite7565a1

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

‎visualpython/js/com/com_Kernel.js‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -610,10 +610,14 @@ define([
610610
*@param {*} dataframe
611611
*@returns
612612
*/
613-
getRowList(dataframe){
613+
getRowList(dataframe,start_idx){
614614
varthat=this;
615+
if(typeofstart_idx==='undefined'){
616+
start_idx=0;
617+
}
618+
615619
returnnewPromise(function(resolve,reject){
616-
that.execute(com_util.formatString('_vp_print(_vp_get_rows_list({0}))',dataframe))
620+
that.execute(com_util.formatString('_vp_print(_vp_get_rows_list({0}, {1}))',dataframe,start_idx))
617621
.then(function(resultObj){
618622
resolve(resultObj);
619623
}).catch(function(err){

‎visualpython/js/m_apps/Subset.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ define([
349349
letstart=that.state.rowLimit;
350350
letend=start+10;
351351
letsubsetVariable=com_util.formatString('{0}.iloc[{1}:{2}]',that.state.pandasObject,start,end);
352-
vpKernel.getRowList(subsetVariable).then(function(resultObj){
352+
vpKernel.getRowList(subsetVariable,start).then(function(resultObj){
353353
let{ result}=resultObj;
354354
var{list:rowList}=JSON.parse(result);
355355
rowList=rowList.map(function(x){

‎visualpython/python/pandasCommand.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,16 @@
1111
# from IPython.core.display is deprecated since IPython 7.14
1212
fromIPython.displayimportdisplay
1313

14-
def_vp_get_rows_list(df):
14+
def_vp_get_rows_list(df,start_idx=0):
1515
"""
1616
Get Rows List with Detail Information
1717
"""
1818
rowInfo= {'name':df.index.name,'level':df.index.nlevels,'list': [] }
1919
indexType=str(df.index.dtype)
2020
# make dict for rows info
2121
fori,rinenumerate(df.index):
22-
rInfo= {'label':r,'value':r,'location':i }
22+
rInfo= {'label':r,'value':r,'location':start_idx+i }
23+
2324
# value
2425
iftype(r).__name__=='str':
2526
rInfo['value']="'{}'".format(r)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp