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_r207979123
##########
File path: superset/assets/src/welcome/TagsTable.jsx
##########
@@ -0,0 +1,89 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import moment from 'moment';
+import { Table, Tr, Td, unsafe } from 'reactable';
+import 'whatwg-fetch';
+
+import { fetchObjects } from '../tags';
+import Loading from '../components/Loading';
+import '../../stylesheets/reactable-pagination.css';
+import { t } from '../locales';
+
+const propTypes = {
+ search: PropTypes.string,
+};
+
+export default class TagsTable extends React.PureComponent {
+ constructor(props) {
+ super(props);
+ this.state = {
+ objects: false,
+ };
+ this.fetchResults = this.fetchResults.bind(this);
+ }
+ componentDidMount() {
+ this.fetchResults(this.props.search);
+ }
+ componentWillReceiveProps(newProps) {
+ if (this.props.search !== newProps.search) {
+ this.fetchResults(newProps.search);
+ }
+ }
+ fetchResults(search) {
+ fetchObjects(search, null, (data) => {
Review comment:
as a user, I have no clue what the arguments to this function mean. it would
be MUCH more readable if you used an object with named keys
----------------------------------------------------------------
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]