Giter VIP home page Giter VIP logo

Comments (9)

linonetwo avatar linonetwo commented on May 26, 2024 1

I think I don't really need a persist state, just a default order is enough. This also prevent changes in the git.

from tw-shiraz.

kookma avatar kookma commented on May 26, 2024

The delete all only appears if you click on delete button on the header in Edit mode.

There is a temp tiddler $:/temp/tables/delete-all
delete it and see if still you have the warning red bar?

What happen when you click no on the warning bar? Is it persistent?

from tw-shiraz.

linonetwo avatar linonetwo commented on May 26, 2024

You can try it directly on my wiki ( on this, https://onetwo.ren/wiki/#%E4%BE%A7%E8%BE%B9%E6%A0%8F%E6%83%B3%E6%B3%95%E5%88%97%E8%A1%A8:%E4%BE%A7%E8%BE%B9%E6%A0%8F%E6%83%B3%E6%B3%95%E5%88%97%E8%A1%A8%20Index this site is single HTML ,so editable and not saved) ( https://wiki.onetwo.ren/#%E4%BE%A7%E8%BE%B9%E6%A0%8F%E6%83%B3%E6%B3%95%E5%88%97%E8%A1%A8:%E4%BE%A7%E8%BE%B9%E6%A0%8F%E6%83%B3%E6%B3%95%E5%88%97%E8%A1%A8%20Index is readonly)

On this sidebar tab

截屏2023-05-26 12 33 02

Clicking "no" have no effect
截屏2023-05-26 12 31 30

and $tw.wiki.getTiddler('$:/temp/tables/delete-all') don't exists.

This only happened on sidebar

from tw-shiraz.

kookma avatar kookma commented on May 26, 2024

While I see the error on your wiki, but I cannot reproduce it on the demo page, as I use template for tabs. I believe this is a TiddlyWiki bad design of tabs where in that the currentTiddler does not work and you have to use template.

Dynamic table uses stateTiddler for intermediate data! when it is not passed explicitly in macro call, the currentTiddler is used and when dynamic tables are called from sidebar (e.g. tabs) the issue appears.

To solve your case do as below:

\define sv-exclude-tags() 想法

<$tiddler tiddler=<<currentTab>> >

<<table-dynamic filter:"[tag[想法]]" fields:"title created tags tbl-expand" pagination:yes class:"w-100 table-center" editButton:no emptyMessage:"太好了,所有想法都整理到笔记里">>

</$tiddler>

from tw-shiraz.

kookma avatar kookma commented on May 26, 2024

Another solution is to use an explicit stateTiddler, like below:

<<table-dynamic filter:"[tag[想法]]" 
  fields:"title created tags tbl-expand" 
 pagination:yes class:"w-100 table-center" 
 editButton:no 
 emptyMessage:"太好了,所有想法都整理到笔记里"
stateTiddler:"Some State Tiddler Title Here" >>

from tw-shiraz.

linonetwo avatar linonetwo commented on May 26, 2024

\define sv-exclude-tags() 想法

<$tiddler tiddler=<> >

<<table-dynamic filter:"[tag[想法]]" fields:"title created tags tbl-expand" pagination:yes class:"w-100 table-center" editButton:no emptyMessage:"太好了,所有想法都整理到笔记里">>

</$tiddler>

This works, thank you!

Just wrapping things that will show in sidebar, warp in <$tiddler tiddler=<<currentTab>> > </$tiddler>

from tw-shiraz.

linonetwo avatar linonetwo commented on May 26, 2024

But this does not work state:侧边栏想法列表/state , still shows error.

And it also not presist sort state. Which I hope can be achieved by #36

from tw-shiraz.

kookma avatar kookma commented on May 26, 2024

Did you clearly set the stateTiddler on table-dynamic call?

from tw-shiraz.

kookma avatar kookma commented on May 26, 2024

And it also not presist sort state. Which I hope can be achieved by #36

I think when you set a stateTiddler like mystate the Shiraz creates a tiddler like
$:/state/dynamictables/mystate/sortby and if you work on Node.JS this tiddler is not saved between sessions.

If you need to keep state, I have to do some changes in state handling in dynamic table.

For more info see https://kookma.github.io/TW-Shiraz/#%24%3A%2Fplugins%2Fkookma%2Fshiraz%2Fmacros%2Fdtables%2Fhelper to learn how Shiraz handles state and temp tiddlers for Dynmaic Table.

from tw-shiraz.

Related Issues (20)

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.