Skip to content

Conversation

@Desmenez
Copy link
Contributor

@Desmenez Desmenez commented Sep 25, 2025

Why did you create this PR

To fix the problem when connect with another table shows all items in that table as options.

What did you do

Replaced with a combobox to handle this case.
Limit the query with take = 10 to reduce load, and added a search functionality.

Now I got a majority problem

1. No connected value in update page

When connect with another table on the update page, the connected value does not appear in this version of Genseki.

https://linear.app/metier/issue/BRV-517/genseki-%E0%B8%82%E0%B9%89%E0%B8%AD%E0%B8%A1%E0%B8%B9%E0%B8%A5%E0%B8%9A%E0%B8%B2%E0%B8%87-field-%E0%B8%AB%E0%B8%B2%E0%B8%A2%E0%B8%95%E0%B8%AD%E0%B8%99%E0%B8%81%E0%B8%94-edit

2. Typesafe

In this PR, I implemented new options for the posts collection, for example:

  author: async ({ body }) => {
    const opt = (body as any).__options ?? {}

and

  tag: async ({ body }: { body: any }) => {
    const opt = body.__options ?? {}

but I have no idea to get type the __options value.
I think this should be defined or configured in the Genseki types, not declare custom type in posts file?

Screenshots / Recordings

Problem:
image


Combobox:

Screen.Recording.2568-09-25.at.11.54.27.mov

Checklist

  • Self-reviewed your code
  • Wrote coverage tests
  • Added screenshots or recordings if applicable

@changeset-bot
Copy link

changeset-bot bot commented Sep 25, 2025

🦋 Changeset detected

Latest commit: 2144e3e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages
Name Type
@genseki/react Minor
@example/erp Minor
@example/ui-playground Patch
@genseki/next Minor
@genseki/plugins Minor
@genseki/prisma-generator Minor
@genseki/react-query Minor
@genseki/rest Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Desmenez Desmenez force-pushed the napatpon/add-combobox-connect branch from 190d96c to 2144e3e Compare September 29, 2025 09:13
@jettapat-metier jettapat-metier merged commit 16fd18c into softnetics:main Sep 29, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants