Comments (8)
Hello @Rashesh-Bosamiya,
Is there any problem when you use reloadData
function?
from ynexpandablecell.
Actually I am using this library for showing filter options.
I have 7 different filters in each cell. Each filter has option to choose, when user choose any option from any cell's attached view, I have to reload whole tableView to highlight selected option.
Here is the problem, where I reload the whole tableView. It causes too much of dwindled performance.
So it's better to reload particular cell which needs refresh.
from ynexpandablecell.
Hello @Rashesh-Bosamiya,
Maybe you can beginUpdate
and reloadRowsAtIndexPaths
and endUpdate
Is it helpful for you?
from ynexpandablecell.
I have tried reloadRowsAtIndexPaths
, but this reload only cell(s) not attached UIView's.
But not with beginUpdate
& endUpdate
.
I'll try with beginUpdate
& endUpdate
& inform you.
But you got my problem right?
from ynexpandablecell.
Sure. I fully understand what you mean. If you can't do this, I will try in this weekend.
Cheers!
from ynexpandablecell.
My suggestion.
Can we have a method like tableView.expandCell(at indexPath:IndexPath)
? or tableView.refreshCell(at indexPath:IndexPath)
That expand or refresh particular cell programmatically. informally we can achieve our goal to reload particular cell and its attached expandable view as well.
self.tableView.expandAll()
kind of similar to this function.
from ynexpandablecell.
Finally, I found out!
I just need to call reloadRowsAtIndexPaths
.
The problem was:
I was passing incorrect indexPath in reloadRowsAtIndexPaths
function.
I have return 6
in numberOfRowsInSection
method.
Now, this library internally makes double
numberOfRowsInSection
as addition to expandable element.
Now if I want to reload 6th
row, I just need to call tableView.reloadRows(at: [IndexPath(row: 6, section: 0)], with: .automatic)
By the way Thanks for you efforts and Interest.
from ynexpandablecell.
Great! Thank you for contributing this library :)
from ynexpandablecell.
Related Issues (20)
- Expansion Animation Glitches HOT 1
- How to define a nonExpandablecell from a nib? HOT 2
- Isssue With Reusebaility HOT 1
- Expand only one cell? HOT 8
- compromise between row select and expandability. HOT 1
- How to check if is a detailed cell for dynamic height. HOT 1
- bugs with expandCellWithHeightAt indexPath: HOT 7
- 2 layout bugs discovered HOT 2
- Getting duplicated overlapping cells HOT 1
- expandCellWithHeightAt method not calling
- Updating values of expandable cells HOT 1
- Swipe to Delete feature
- Multiple cell under expandable cell
- Multiple cells
- How to save internal values
- Expand only one item at time
- The alignment of expandable are not adjust when doing multiple selection.
- overriding the heightForRowAtIndex doesn't seem to work. HOT 3
- Pre-expanded cell & Prevent user to collapse cell. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ynexpandablecell.