Comments (2)
@noxt привет!
Расскажи, это так задумано, что если добавлять два действия одного типа, то выполняется только последний?
Каждый action сейчас хранится по ключу от имени действия, поэтому каждый новый action просто перезаписывает предыдущий по этому же ключу.
Это хорошая идея. Мы тоже замечали, что такой функционал неплохо бы иметь, но тут есть несколько концептуальных вопросов:
- Должно ли несколько одинаковых действий описываться разными объектами
TableRowAction<StringTableViewCell>(.click)
? - Или это должен быть один объект
TableRowAction
но с методами вродеaddHandler
. Это может быть логичным, у меня один .click и несколько handlers к нему...
Также, что делать в случае, если я хочу удалить одно из действий. И нужно ли вообще давать возможность удалить действие.
В случае с первым подходом - удаление можно было бы сделать назначив TableRowAction
какой-то id и добавить для Row
метод removeActionForId
. Со вторым подходом не так просто... addHandlerForKey
Функция полезная, но видение реализации еще не устоялось.
UPD:
Если я хочу удалить одно из действий в случае первого подхода я должен пройтись по всем Row. В случае второго я просто удаляю один handler на TableRowAction.
from tablekit.
@noxt версия 2.1 теперь поддерживает несколько действий одного типа. Обновил доку.
from tablekit.
Related Issues (20)
- Подскажи пожалуйста, как организовать получение данных из ячеек HOT 7
- How to activate canMove, canMoveTo for sorting drag & drop rows
- [QUESTION] Is there any way to customize rows appending/deleting HOT 1
- What you mean about options.userInfo
- Update sections with animation HOT 2
- Missing header view using AutoLayout HOT 6
- Plain table with no header or footer still shows the header/footer HOT 2
- [QUESTION] Scrolling is relatively glitchy HOT 4
- Support for moving rows? HOT 2
- Crash when doing clear() HOT 2
- [ВОПРОС] Как перезагружать секции при постраничной загрузке HOT 3
- willDisplayHeaderView and willDisplayFooterView HOT 3
- Can't remove top extra space for grouped tableview HOT 8
- ConfigurableCell T triggers SwiftLint warning HOT 2
- Crash on reload of empty table if tableView contains tableHeaderView | iOS 10.3.1 HOT 1
- How to get rid of AutoLayout warning when using TableKit HOT 5
- Remove/delete a section HOT 1
- How to activate ability to delete a row? HOT 14
- How to reload a concrete row or cell? HOT 2
- Pagination?
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 tablekit.