-
Notifications
You must be signed in to change notification settings - Fork 2.7k
[MM-17490] Moved defaultAriaLabelRenderer up to multiselect.jsx #3352
[MM-17490] Moved defaultAriaLabelRenderer up to multiselect.jsx #3352
Conversation
Creating a new SpinWick test server using Mattermost Cloud. |
Timed out waiting for the mattermost installation. Please check the logs. |
Spintmint test server creation failed. See the logs for more information. |
Creating a new SpinWick test server using Mattermost Cloud. |
Timed out waiting for the mattermost installation. Please check the logs. |
Spintmint test server creation failed. See the logs for more information. |
|
Spinmint test server created at: https://i-01f906019d7806583.test.spinmint.com Test Admin Account: Username: Test User Account: Username: Internal IP: 172.26.22.227 |
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.
Quick run-through of the issues I saw and a little surrounding smoke testing looks good to me.
render() { | ||
const options = Object.assign([], this.props.options); | ||
const {totalCount, users, values} = this.props; | ||
|
||
let renderer; | ||
if (this.props.ariaLabelRenderer) { |
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.
It'd be easier to define this as a defaultProp
on the component, so that it's automatically passed as this.props.ariaLabelRenderer
when undefined (but not null) is otherwise passed. Here's an example of another component that does it: https://github.com/mattermost/mattermost-webapp/blob/master/components/widgets/badges/badge.jsx#L16
…ermost#3352) * [MM-17490] Moved defaultAriaLabelRenderer up to multiselect.jsx * Addressing my own feedback
…ermost#3352) * [MM-17490] Moved defaultAriaLabelRenderer up to multiselect.jsx * Addressing my own feedback
Summary
Multiselect was crashing the app when an
ariaLabelRenderer
wasn't specified. This PR moves the default renderer up to the multiselect component so there's always a renderer.Ticket Link
https://mattermost.atlassian.net/browse/MM-17490