A lot of refectoring
This commit is contained in:
@@ -4,7 +4,7 @@ import { useState } from 'react';
|
||||
|
||||
import type { GridlerColumns } from '../components/Column';
|
||||
|
||||
import { APIAdaptorGoLangv2 } from '../components/APIAdaptorGoLangv2';
|
||||
import { GlidlerAPIAdaptorForGoLangv2 } from '../components/adaptors';
|
||||
import { Gridler } from '../Gridler';
|
||||
|
||||
export const GridlerGoAPIExampleEventlog = () => {
|
||||
@@ -51,9 +51,10 @@ export const GridlerGoAPIExampleEventlog = () => {
|
||||
<TextInput label="API Key" onChange={(e) => setApiKey(e.target.value)} value={apiKey} />
|
||||
<Divider />
|
||||
<Checkbox
|
||||
label="Show Side Sections"
|
||||
checked={!!sections}
|
||||
label="Show Side Sections"
|
||||
onChange={(e) => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
||||
e.target.checked
|
||||
? setSections({
|
||||
bottom: <div style={{ backgroundColor: 'teal', height: '25px' }}>bottom</div>,
|
||||
@@ -66,8 +67,8 @@ export const GridlerGoAPIExampleEventlog = () => {
|
||||
/>
|
||||
<Divider />
|
||||
<Gridler
|
||||
height="100%"
|
||||
columns={columns}
|
||||
height="100%"
|
||||
// getMenuItems={(id, _state, row, col, defaultItems) => {
|
||||
// console.log('GridlerGoAPIExampleEventlog getMenuItems root', id, row, col, defaultItems);
|
||||
// return [
|
||||
@@ -92,8 +93,8 @@ export const GridlerGoAPIExampleEventlog = () => {
|
||||
uniqueid="gridtest"
|
||||
values={values}
|
||||
>
|
||||
<Gridler.APIAdaptorGoLangv2 authtoken={apiKey} url={`${apiUrl}/public/process`} />
|
||||
<Gridler.GlidlerFormInterface
|
||||
<GlidlerAPIAdaptorForGoLangv2 authtoken={apiKey} url={`${apiUrl}/public/process`} />
|
||||
<Gridler.FormAdaptor
|
||||
descriptionField={'process'}
|
||||
onRequestForm={(request, data) => {
|
||||
console.log('Form requested', request, data);
|
||||
|
||||
Reference in New Issue
Block a user