Wrong documentation about Grid action extension
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 136
- Forks
- 555
- Avg merge
- 4d 14h
- Merged PRs (30d)
- 4
Description
https://devdocs.prestashop.com/1.7/development/components/grid/tutorials/work-with-row-actions/
Docs are wrong (screenshot 1)
$gridDefinition->getGridActions returns grid actions and not row action.
Row actions are defined in column 'actions', which could be modfied something like this:
- loop through all columns and find action column by id 'actions'
- get column option named 'actions' (it will be RowActionCollection)
- add new action to RowActionCollection by using add() method.
Anyway not only docs needs improvement, but also the code, I wish it is easier to extend, it could be improved to achieve something like:
$grid->getColumnById('action')
->getOption('actions')
->addAction(new Action)
Screenshots:
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Grid row-actions tutorial and compare its screenshot and text with the Grid API described in the issue. Correct the documentation so it distinguishes grid actions from row actions and explains the actions column and RowActionCollection; treat the proposed code API improvement as a separate, broader question because no implementation files or tests are named.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100
