@treelab/revogrid
v3.6.9
Published
Virtual reactive data grid component - RevoGrid.
Downloads
34
Keywords
Readme
Treelab Revogrid
Grid component written using Stencil for Treelab Client. While highly customized, original code was branched from the open source Revogrid library.
Structure
All of the components are located in src folder.
Development
Setup
git clone <this repo>
yarn install
yarn serve
Linking to this package directly from treelab-client
First build this project
cd ..../treelab-revogrid
yarn build
Then link into treelab-client
cd ..../treelab-revogrid
yarn link
cd ..../treelab-client
yarn link @treelab/revogrid
Restart treelab-client
in order for the linked package to be properly included in the build.
Testing
Currently we don't do any automated/unit testing.
Publishing
All published versions can be found on npmjs.com
Latest code can be built and published as an npm package using the Create new release and publish to npm GitHub action. Please carefully choose a semantic version when executing Run workflow
such that it is higher than the previous version published.
i18n
- Add locale info in
src/locales/[lang].json
- usage
- import i18nState, such as
import { i18nState } from '../../locales/i18n.store';
i18nState.i18nStore.Intl?.formatMessage({ id: 'can.not.add.row.reminder' })
- import i18nState, such as
- customize locale data
- optionally pass the locale data with the
customizedMessage
property ofrevogrid
to overwrite defaults - the customize localed data that must have the ids inclueded in default
src/locales/[lang].json
like something below,
const customizedMessage = { zh: { 'can.not.add.row.reminder': '同步表暂不支持添加行' }, en: { 'can.not.add.row.reminder': 'Can not add row in sync table temporarily' }, };
- optionally pass the locale data with the