williaster commented on a change in pull request #5524: A tagging system for
dashboards, charts and queries
URL:
https://github.com/apache/incubator-superset/pull/5524#discussion_r207978319
##########
File path: superset/assets/src/welcome/App.jsx
##########
@@ -13,19 +18,57 @@ const propTypes = {
export default class App extends React.PureComponent {
constructor(props) {
super(props);
+ const parsedUrl = new URL(window.location);
+ const key = parsedUrl.hash.substr(1) || 'dashboards';
+ const dashboardSearch = parsedUrl.searchParams.get('search') || '';
+ const tagSearch = parsedUrl.searchParams.get('tags') || '';
this.state = {
- search: '',
+ key,
+ dashboardSearch,
+ tagSearch,
+ tagSuggestions: STANDARD_TAGS,
};
- this.onSearchChange = this.onSearchChange.bind(this);
+
+ this.handleSelect = this.handleSelect.bind(this);
+ this.onDashboardSearchChange = this.onDashboardSearchChange.bind(this);
+ this.onTagSearchChange = this.onTagSearchChange.bind(this);
+ }
+ componentDidMount() {
+ fetchSuggestions(false, (suggestions) => {
+ const tagSuggestions = STANDARD_TAGS.concat(
Review comment:
object spread is preferred over `concat` eg `[...array]`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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]