Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support subproperties as a title #1643

Merged

Conversation

smacker
Copy link
Contributor

@smacker smacker commented Mar 28, 2024

This change allows setting a sub property as a title of resource.

For example:

      resource: {
        model: getModelByName('Sport'),
        client: prisma,
      },
      options: {
        titleProperty: 'translation.en',
        listProperties: ['translation.ja', 'translation.en'],
        properties: {
          translation: { type: 'mixed' },
          'translation.ja': { type: 'string' },
          'translation.en': { type: 'string' },
          // some other props
        },
      },

In master branch such titleProperty is just ignored which is an unexpected behavior.

@dziraf
Copy link
Contributor

dziraf commented Mar 28, 2024

@smacker Thanks, I'll merge this. Using the helper method actually makes more sense here.

@dziraf dziraf merged commit 85d26e4 into SoftwareBrothers:master Mar 28, 2024
4 checks passed
Copy link

🎉 This PR is included in version 7.8.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants