-
Notifications
You must be signed in to change notification settings - Fork 821
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
FIX remove placeholder search text on readonly field #11419
base: 5
Are you sure you want to change the base?
FIX remove placeholder search text on readonly field #11419
Conversation
@@ -139,7 +139,6 @@ public function getPlaceholder(): string | |||
return $emptyString; | |||
} | |||
} | |||
$name = $this->getName(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this isn't used below, which I assume is why you've removed it? Please add a note in future when making changes like this so it's easier to know what's going on.
It's obvious in your IDE because it presumably gets greyed out, but seeing why a change like this was made in a git diff requires more double checking.
@@ -598,6 +597,9 @@ public function performReadonlyTransformation() | |||
$field->setSource($this->sourceList); | |||
$field->setReadonly(true); | |||
|
|||
// Remove the text "Type to search..." on a read-only field | |||
$this->setUseDynamicPlaceholder(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$this->setUseDynamicPlaceholder(false); | |
$field->setUseDynamicPlaceholder(false); |
Shouldn't this be called on the field we're returning?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, it should. I suspect it won't work because we are now using a different field type, so I'm going to keep playing with this 'til my test passes 🤔
5835657
to
30049dd
Compare
30049dd
to
b5203fd
Compare
@andrewandante Let me know when this is ready to review and I'll take another look |
Thanks - I asked for reproduction steps in the attached issue, I suspect this may also be coming from the React component actually. |
Description
Sets the placeholder text to an empty string on a readonly, "searchable" dropdown.
Also removes a line that sets a
$name
variable as it is unused in the methodIssues
Pull request checklist