Skip to content

Commit 27e7090

Browse files
keydunovpaveltiunov
authored andcommitted
fix: client-react - query prop now has default blank value (#54)
No need to pass redundant blank query to QueryBuilder. Also, mark cubejsApi prop as required.
1 parent b074a3d commit 27e7090

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/cubejs-react/src/QueryRenderer.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,12 @@ export default class QueryRenderer extends React.Component {
8585
QueryRenderer.propTypes = {
8686
render: PropTypes.func,
8787
afterRender: PropTypes.func,
88-
cubejsApi: PropTypes.object,
88+
cubejsApi: PropTypes.object.isRequired,
8989
query: PropTypes.object,
9090
queries: PropTypes.object,
9191
loadSql: PropTypes.any
9292
};
93+
94+
QueryRender.defaultProps = {
95+
query: {}
96+
}

0 commit comments

Comments
 (0)