Coder Social home page Coder Social logo

radar-azdelta / svelte-datatable Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 0.0 5.24 MB

A datatable in Svelte that can handle very lage CSV's with ease.

Home Page: https://radar-azdelta.github.io/svelte-datatable/

License: GNU General Public License v3.0

JavaScript 0.30% TypeScript 47.70% HTML 0.38% Svelte 41.06% SCSS 10.35% Shell 0.21%

svelte-datatable's People

Contributors

bostoentoby avatar louis-herreman avatar pjlammertyn avatar thearcanebrony avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

svelte-datatable's Issues

Basis structuur

Als basis structuur had ik dit in gedachten:

enum SortDirection {
    Up = 1,
    Down = 2
}

interface IColumnFilter {
    column: string,
    filter?: string | RegExp  //if the value is undefined, we need to clear the filter. 
}

interface IColumnSort {
    column: string,
    sortDirection?: SortDirection  //if the value is undefined, we need to remove the sorting. 
}

interface ITablePagination {
    currentPage: number,
    totalPages: number,
    rowsPerPage: number
}

interface ITableData {
    columns?: string[]
    data?: any[][] // an array (the rows), of array values (the columns per row)
}

interface ITable {
    //GUI invoked methods
    applyColumnFilter(columnFilter: IColumnFilter): void;
    applyColumnSort(columnSort: IColumnSort): void;
    applyTablePagination(tablePagination: ITablePagination): void;

    //data methods
    fetchData(columnFilters?: IColumnFilter[], columnSorts?: IColumnSort[], tablePagination?: ITablePagination[]): Promise<ITableData>; //async function !!!!!!!

    //render methods
    renderTable(tableData: ITableData): void;
}

implement column resize

see ColumnResize.svelte

using pointermove-pointerup or mousemove-mouseup/down events or the dragstart-dragmove event

you will need to calculate the width of each column (if not set by the columns property)

the resize can not be larger than the width to the columns next to it!

Bugs in DataTables

  • Going to last page & then opening other file and checking if you're directed to the same page while it does not exist?
  • Insert file and then delete a column in that file and insert it again?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.