Skip to content

Commit ef779e1

Browse files
[update] React and Vue integration guides
1 parent fa7f6ca commit ef779e1

File tree

2 files changed

+4
-43
lines changed

2 files changed

+4
-43
lines changed

docs/react_integration.md

+1-17
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export default function DHTMLXSpreadsheet(props) {
111111

112112
#### Adding styles
113113

114-
To display Spreadsheet correctly, you need to provide the corresponding styles. You can use the **index.css** file to specify important styles for Spreadsheet and its container:
114+
To display Spreadsheet correctly, you need to specify important styles for Spreadsheet and its container in the main css file of the project:
115115

116116
~~~css title="index.css"
117117
/* specify styles for initial page */
@@ -241,22 +241,6 @@ useEffect(() => {
241241
// ...
242242
~~~
243243

244-
### Step 3. Adding Spreadsheet into the app
245-
246-
To add the component into the app, open the **App.js** file and replace the default code with the following one:
247-
248-
~~~jsx title="App.js"
249-
import Spreadsheet from "./Spreadsheet";
250-
import { getData } from "./data";
251-
252-
function App() {
253-
let data = getData();
254-
return <Spreadsheet data={data} />;
255-
}
256-
257-
export default App;
258-
~~~
259-
260244
After that, you can start the app to see Spreadsheet loaded with data on a page.
261245

262246
![Spreadsheet initialization](assets/integrations/trial_spreadsheet.png)

docs/vuejs_integration.md

+3-26
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,13 @@ export default {
120120

121121
#### Adding styles
122122

123-
To display Spreadsheet correctly, you need to provide the corresponding styles. You can use any **.css** file to specify important styles for Spreadsheet and its container:
123+
To display Spreadsheet correctly, you need to specify important styles for Spreadsheet and its container in the main css file of the project:
124124

125-
~~~css title="index.css"
125+
~~~css title="main.css"
126126
/* specify styles for initial page */
127127
html,
128128
body,
129-
#root { /* make sure that you use the #root container */
129+
#app { /* make sure that you use the #app root container */
130130
height: 100%;
131131
padding: 0;
132132
margin: 0;
@@ -262,29 +262,6 @@ export default {
262262
<!--...-->
263263
~~~
264264

265-
### Step 3. Adding Spreadsheet into the app
266-
267-
To add the component into the app, open the **App.vue** file and replace the default code with the following one:
268-
269-
~~~html title="App.vue"
270-
<script>
271-
import Spreadsheet from "./components/Spreadsheet.vue";
272-
import { getData } from "./data";
273-
274-
export default {
275-
components: { Spreadsheet },
276-
data() {
277-
return { data: getData() };
278-
}
279-
};
280-
</script>
281-
282-
<template>
283-
<Spreadsheet :data="data" />
284-
</template>
285-
286-
~~~
287-
288265
After that, you can start the app to see Spreadsheet loaded with data on a page.
289266

290267
![Spreadsheet initialization](assets/integrations/trial_spreadsheet.png)

0 commit comments

Comments
 (0)