Taglist in relation mode fetches the data twice
@mjauvin is already working on this.
Since Mar 24, 2025.
- Dominant language
- PHP
- Stars
- 1.5k
- Forks
- 246
- Avg merge
- 19h 2m
- Merged PRs (30d)
- 7
Description
Winter CMS Build
1.2
PHP Version
8.2
Database engine
MySQL/MariaDB
Plugins installed
No response
Issue description
Hi,
I have the following form field:
assignees:
label: 'taglist'
mode: relation
customTags: false
nameFrom: id
options: true
span: full
separator: space
type: taglist
I set options: true to have the getAssigneesOptions method called as the documentation states. However, for some reason the taglist control, executes the query by itself and then discards the result in favor of the data returned by the getAssigneesOptions method. In fact, I'm forced to set the nameFrom property to a valid model attribute in order to make the taglist work.
When setting options: true, the taglist control should not execute any query by itself.
Steps to replicate
- Create a taglist in relation mode.
- Set
options: true - Test it.
Workaround
Set nameFrom to a valid model attribute and it works as "expected".
Contributor guide
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.
Assessment
This issue has not been assessed yet.