AttributeFilter Component
Attribute filter component is a dropdown component that lists attribute values. You can pass a callback function, which receives a list of the selected values when a user clicks Apply.
Example
In the following example, attribute values are listed and the onApply
callback function is triggered when a user clicks Apply to confirm the selection.
import React, { Component } from 'react';
import { AttributeFilter } from '@gooddata/react-components';
import '@gooddata/react-components/styles/css/main.css';
import { employeeNameIdentifier, workspaceId } from '../utils/fixtures';
export class AttributeFilterExample extends Component {
onApply(params) {
// eslint-disable-next-line no-console
console.log('AttributeFilterExample onApply', ...params);
}
render() {
return (
<div>
<AttributeFilter
identifier={employeeNameIdentifier}
projectId={workspaceId}
onApply={this.onApply}
sdk={<sdk>}
/>
</div>
);
}
}