Skip to content

Unable to remove a relationship when setIsMultiple is false (no cross icon) #335

@RuthAdele

Description

@RuthAdele

Module version(s) affected

3.4.0 and 4.0.2

Description

If ->setIsMultiple(false), you can select an option, but you cannot remove that selection.

I have tested this on 3.4.0 and 4.0.2, and it's the same on both.

Image

Related issue
This may be related to the fix from #195
In that Issue, you can see that there used to be a "x" to remove the selection when ->setIsMultiple(false)

How to reproduce

Steps to recreate
Create a TagField with setIsMultiple to false.

TagField::create(
	'Categories',
	'Categories',
	CourseCategory::get(),
	$this->Categories()
)->setIsMultiple(false)

Possible Solution

No response

Additional Context

No response

Validations

  • Check that there isn't already an issue that reports the same bug
  • Double check that your reproduction steps work in a fresh installation of silverstripe/installer (with any code examples you've provided)

PRs

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions