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

Selected tag is not shown when isMutliple is false #195

Closed
bumbus opened this issue Oct 13, 2021 · 2 comments · Fixed by #201
Closed

Selected tag is not shown when isMutliple is false #195

bumbus opened this issue Oct 13, 2021 · 2 comments · Fixed by #201

Comments

@bumbus
Copy link

bumbus commented Oct 13, 2021

I have no clue if I am using it wrong, but if ->setIsMultiple(false) is set a selected tag title is not displayed.
But the record in the many_many junction table is created and the X also shows that some relation is present.

Screenshot

PRs

@micschk
Copy link
Contributor

micschk commented Dec 16, 2021

I can confirm this issue, ->setIsMultiple(false) results in the current value not being displayed.
I suspect this has something to do with the check around line 13 in TagField.js.:

    if (!this.isControlled()) {
      this.state = {
        value: props.value,
      };
    }

Would have been happy to attempt a fix but as its react and I need to install like an extra operating system before I can attempt anything, I'm leaving this to the pros. #6689

emteknetnz pushed a commit that referenced this issue Jun 7, 2022
* doc: add note about `setTitleField` (Fixes #153)

* NEW Add support for saving tag value into has_one components

FIX Value not shown if isMultiple is false (#195)

* fix: don't default to ID column as pgsql throws an error if comparing string value
@emteknetnz
Copy link
Member

Linked PR has been merged

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

Successfully merging a pull request may close this issue.

3 participants