
Security News
Risky Biz Podcast: Making Reachability Analysis Work in Real-World Codebases
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
@ssfbank/sanity-plugin-byo-table
Advanced tools
Input component for your own table schema type for Sanity CMS
Sanity plugin that supplies the react editor for a user defined table and row. Basically, bring your own schema.
This repo is forked from sanity-plugin-table
sanity install @ssfbank/sanity-plugin-byo-table
Start with the cell level of the table, which should be an object. The name of this cell object can be anything.
export default {
title: 'Table Cell',
name: 'cell',
type: 'object',
fields: [
{
name: 'value',
title: 'The value',
type: 'string'
},
{
name: 'anotherValue',
title: 'More value',
type: 'number'
}
],
preview: {
select: {
title: 'value',
subtitle: 'anotherValue'
}
}
};
Define the row level. This is restricted to have only one field and that should be an array of the cell object. The name of this table row object can be anything.
export default {
title: 'Table Row',
name: 'row',
type: 'object',
fields: [
{
name: 'cells',
type: 'array',
of: [{ type: 'cell' }]
}
]
};
The actual document(or object) where you want a table should have a field of type array of the row object. It also needs to have input component RowsInput.
import RowsInput from 'part:@ssfbank/sanity-plugin-byo-table/rows-input';
export default {
title: 'Table',
name: 'table',
type: 'document',
fields: [
{
name: 'title',
type: 'string',
title: 'Title'
},
{
name: 'totallyRelatedData',
type: 'array',
description: 'Table related data not involved in the plugin.',
of: [
{
type: 'string',
}
]
},
{
name: 'rows',
title: 'Table Rows',
type: 'array',
of: [
{
type: 'row',
}
],
inputComponent: RowsInput
}
],
preview: {
select: {
title: 'title'
}
}
};
Finally, register these types in the schema:
import cell from './example-schema/cell';
import row from './example-schema/row';
import table from './example-schema/table';
const tableTypes = [cell, row, table];
const allSchemaTypes = schemaTypes
.concat(tableTypes);
export default createSchema({
name: 'default',
types: allSchemaTypes,
});
These examples are attached under /example-schema
If coming from the original fork and wanting to switch to this plugin, you can do it without migrating. Just install this plugin, remove the old one, copy in the schema and point the RowsInput-component to the 'rows' field.
FAQs
Input component for your own table schema type for Sanity CMS
The npm package @ssfbank/sanity-plugin-byo-table receives a total of 0 weekly downloads. As such, @ssfbank/sanity-plugin-byo-table popularity was classified as not popular.
We found that @ssfbank/sanity-plugin-byo-table demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.