Skip to content

Commit 9c5d0a5

Browse files
committed
Fix - Update README
1 parent 0f4ddd2 commit 9c5d0a5

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

README.md

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,17 +1091,9 @@ A composable that **flattens** a reactive object into a set of refs (one for eac
10911091
- **Dynamic path support**: New paths added at runtime are discovered automatically (and proxied), so you never lose reactivity when mutating the structure.
10921092

10931093
```js
1094-
import { useObjectBindings } from "vue-data-ui";
1094+
import { useObjectBindings, getVueDataUiConfig } from "vue-data-ui";
10951095

1096-
const config = ref({
1097-
customPalette: ["#CCCCCC", "#1A1A1A"],
1098-
style: {
1099-
chart: {
1100-
backgroundColor: "#FFFFFF",
1101-
color: "#1A1A1A",
1102-
},
1103-
},
1104-
});
1096+
const config = ref(getVueDataUiConfig("vue_ui_donut")); // or your custom config for this component
11051097

11061098
const bindings = useObjectBindings(config);
11071099
// Now `bindings` has computed refs for each leaf path:
@@ -1117,7 +1109,10 @@ You can then use these in your template:
11171109
```html
11181110
<template>
11191111
<div>
1120-
<input type="color" v-model="bindings['style.chart.backgroundColor']" />
1112+
<input
1113+
type="color"
1114+
v-model="bindings['style.chart.backgroundColor'].value"
1115+
/>
11211116
</div>
11221117
</template>
11231118
```

0 commit comments

Comments
 (0)