mistercrunch commented on a change in pull request #8291: (Fix ##8288): Select
box now searchable by verbose tags
URL:
https://github.com/apache/incubator-superset/pull/8291#discussion_r332129937
##########
File path: superset/assets/src/components/OnPasteSelect.jsx
##########
@@ -64,6 +64,23 @@ export default class OnPasteSelect extends React.Component {
}
}
}
+ customFilter(option, searchText) {
+ // customFilter is passed as a function to react-select library
+ // in the case that there is a column name and verbose name
+ if (!option.column_name) {
+ return false;
+ }
+ if (
+ option.column_name.toLowerCase().includes(searchText.toLowerCase()) ||
Review comment:
```js
const lowerSearchText = searchText.toLowerCase();
return (
option.column_name.toLowerCase().includes(lowerSearchText) || (
!!option.verbose_name &&
option.verbose_name.toLowerCase().includes(lowerSearchText)
)
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]