-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Tables] Clean up filter code logic #5063
Comments
So the idea is to extract the method that cleans the table and call addRows at the end, right?.Could I take this one? |
@JonanOribe Right, so find anywhere that Once that's done, remove the 'type' parameter from And sure, it would be great if you could take a look at it! Thank you! |
@akhenry looking at the code I saw that .clear() emit a 'remove' instead of the 'filter' that is called by the actual addRows when 'filter' is passed as a parameter. So, if I make the changes as you say, we have some problems with the functionality and some test cases just fail. A workaround that I found, and with all testing goes green, is to make this:
Now, we have one method for cleaning and filtering and another for adding rows. I did not change the .clear() because it is called in many different places on code, but 'filter' just on one, so in my opinion, is more secure to make this change only on the new function. What do you think? if neccesary, I look for another solution. Thank you! |
I added the mentioned code on this PR |
Testing NotesThis is a non-functional change with a risk of introducing regressions into tables, particularly with table filtering.
Testing NotesVerify that you can filter rows and export as CSV and it reflects selection |
Summary
The TableRowCollection will conditionally clear the current contents of the table based on the value of a flag that is passed into the
addRows
function. HavingaddRows
clear the current table is an unexpected side effect of a function calledaddRows
. Instead the calling code should clear the table, then calladdRows
.The text was updated successfully, but these errors were encountered: