diff --git a/src/App.jsx b/src/App.jsx
index c6922cf..aec68c2 100644
--- a/src/App.jsx
+++ b/src/App.jsx
@@ -6,13 +6,13 @@ import DynamicComponentsExample from "./dynamicComponentExample/DynamicComponent
import RichGridExample from "./richGridExample/RichGridExample";
import RichComponentsExample from "./richComponentExample/RichComponentsExample";
import EditorComponentsExample from "./editorComponentExample/EditorComponentsExample";
-import FloatingRowComponentExample from "./floatingRowExample/FloatingRowComponentExample";
+import PinnedRowComponentExample from "./pinnedRowExample/PinnedRowComponentExample";
import FullWidthComponentExample from "./fullWidthExample/FullWidthComponentExample";
import GroupedRowInnerRendererComponentExample from "./groupedRowInnerRendererExample/GroupedRowInnerRendererComponentExample";
import FilterComponentExample from "./filterComponentExample/FilterComponentExample";
import MasterDetailExample from "./masterDetailExample/MasterDetailExample";
import SimpleReduxExample from "./simpleReduxExample/SimpleReduxExample";
-import SimpleGridExample from "./floatingFilter/SimpleGridExample";
+import FloatingFilterGridExample from "./floatingFilter/FloatingFilterGridExample";
class App extends Component {
constructor(props) {
@@ -45,7 +45,7 @@ class App extends Component {
this.setExample("dynamic")}>Dynamic React Component Example
this.setExample("rich-dynamic")}>Dynamic React Components - Richer Example
this.setExample("editor")}>Cell Editor Component Example
- this.setExample("floating-row")}>Pinned Row Renderer Example
+ this.setExample("pinned-row")}>Pinned Row Renderer Example
this.setExample("full-width")}>Full Width Renderer Example
this.setExample("group-row")}>Grouped Row Inner Renderer Example
this.setExample("filter")}>Filters Component Example
@@ -66,8 +66,8 @@ class App extends Component {
case 'editor':
example = ;
break;
- case 'floating-row':
- example = ;
+ case 'pinned-row':
+ example = ;
break;
case 'full-width':
example = ;
@@ -85,7 +85,7 @@ class App extends Component {
example = ;
break;
case 'floating-filter':
- example = ;
+ example = ;
break;
default:
example = ;
diff --git a/src/floatingFilter/SimpleGridExample.jsx b/src/floatingFilter/FloatingFilterGridExample.jsx
similarity index 71%
rename from src/floatingFilter/SimpleGridExample.jsx
rename to src/floatingFilter/FloatingFilterGridExample.jsx
index 1e2b707..9df0852 100644
--- a/src/floatingFilter/SimpleGridExample.jsx
+++ b/src/floatingFilter/FloatingFilterGridExample.jsx
@@ -1,8 +1,9 @@
import React, {Component} from "react";
import {AgGridReact} from "ag-grid-react";
import FloatingFilter from "./floatingFilter";
+import overrideStyle from "./floatingFilter.css";
-export default class extends Component {
+export default class FloatingFilterGridExample extends Component {
constructor(props) {
super(props);
@@ -21,7 +22,12 @@ export default class extends Component {
createColumnDefs() {
return [
- {headerName: "Make", field: "make", floatingFilterComponentFramework: FloatingFilter, filter:'set'},
+ {
+ headerName: "Make",
+ field: "make",
+ floatingFilterComponentFramework: FloatingFilter,
+ filter: 'set'
+ },
{headerName: "Model", field: "model"},
{headerName: "Price", field: "price"}
];
@@ -36,13 +42,16 @@ export default class extends Component {
}
render() {
- let containerStyle = {
- height: 115,
- width: 500
+ let divStyle = {
+ height: 400,
+ width: 945
};
+ // combine the styles
+ const style = Object.assign({}, divStyle, overrideStyle);
+
return (
-
+
Simple ag-Grid React Example
it != item)
+ model: this.state.parentModel.filter(it => it !== item)
});
}
render() {
if (!this.state.parentModel) return null;
- let that = this;
- let options = this.state.parentModel.map ((item, i)=>{
- let that = this;
- let removeMeListener = ()=>{
+ // as the backing filter is a set filter what we're doing here is rendering the list in the set
+ // and when the [x] removing the selected item, thereby effectively hiding it
+ let options = this.state.parentModel.map((item, i) => {
+ let removeMeListener = () => {
this.remove(item)
- }
+ };
let removeMeElement = [x];
return {item}{removeMeElement};
});
diff --git a/src/floatingRowExample/FloatingRowComponentExample.jsx b/src/pinnedRowExample/PinnedRowComponentExample.jsx
similarity index 86%
rename from src/floatingRowExample/FloatingRowComponentExample.jsx
rename to src/pinnedRowExample/PinnedRowComponentExample.jsx
index c5f5d51..3419232 100644
--- a/src/floatingRowExample/FloatingRowComponentExample.jsx
+++ b/src/pinnedRowExample/PinnedRowComponentExample.jsx
@@ -3,7 +3,7 @@ import React, {Component} from "react";
import {AgGridReact} from "ag-grid-react";
import StyledRenderer from "./StyledRenderer";
-export default class FloatingRowComponentExample extends Component {
+export default class PinnedRowComponentExample extends Component {
constructor(props) {
super(props);
@@ -33,8 +33,8 @@ export default class FloatingRowComponentExample extends Component {
headerName: "Row",
field: "row",
width: 400,
- floatingCellRendererFramework: StyledRenderer,
- floatingCellRendererParams: {
+ pinnedRowCellRendererFramework: StyledRenderer,
+ pinnedRowCellRendererParams: {
style: {'fontWeight': 'bold'}
}
},
@@ -42,8 +42,8 @@ export default class FloatingRowComponentExample extends Component {
headerName: "Number",
field: "number",
width: 399,
- floatingCellRendererFramework: StyledRenderer,
- floatingCellRendererParams: {
+ pinnedRowCellRendererFramework: StyledRenderer,
+ pinnedRowCellRendererParams: {
style: {'fontStyle': 'italic'}
}
},
@@ -55,7 +55,7 @@ export default class FloatingRowComponentExample extends Component {
for (let i = 0; i < 15; i++) {
rowData.push({
- row: "Rou " + i,
+ row: "Row " + i,
number: Math.round(Math.random() * 100)
});
}
diff --git a/src/floatingRowExample/StyledRenderer.jsx b/src/pinnedRowExample/StyledRenderer.jsx
similarity index 100%
rename from src/floatingRowExample/StyledRenderer.jsx
rename to src/pinnedRowExample/StyledRenderer.jsx