1st Button in inline_usecombination not working correctly
Bug Report
Prerequisites
- [x] Did you reproduce the problem on TYPO3 core master?
- [x] Did you reproduce the problem on TYPO3 v10.4 LTS?
- [ ] Did you reproduce the problem on TYPO3 v9.5 LTS?
Description
The example tx_styleguide_inline_usecombination has two buttons:
- Button 1 shall create a new record, of the child table.
- Button 2 shall create a relation to an existing record of the child table.

Both buttons work similar and depend on the situation if a child record to create a relation is available.
If there exist child records without relation a relation is created, else a new record .
So the behavior of the buttons never depends at all on their intended purpose but on the potential child records.
Steps to Reproduce
- Install TYPO3 with the extension styleguide.
- try to use the buttons like intended with and without child records that haven't a relation.
Expected behavior: [What you expected to happen]
In any case I expect that the 1st button is creating a new child record and no relation.
Actual behavior: [What actually happened]
The 1st button creates a new relation only if no more child records can be found to include in a relation.
Versions
typo3/cms-core: 11.5.x-dev f9e8cdb
typo3/cms-styleguide: 11.x-dev 57b637f
If there are no more records to create a relation, the second button is also creating a new relation. So that could be a feature but actually that's perhaps neither like intended.