Osamz
Osamz
FFilament
Created by Osamz on 6/11/2024 in #❓┊help
Add data-attribute to options in select, do things using js, without xhr request
Hi, I have a Form, in which the user will select an option, based on this option, 2 Input fields should be updated, for example: Based on selected option the range of numeric values are allowed to user, user then writes in 1st Input the number of start, the 2nd Input will updated automatically based on Selected option.
Imagine I have visit program options, every visit plane has it's own number of days, (2 days, 5 days...etc), I want user to choose a plane, then input the day of start journey, 2nd Input will shows the last day of journey, basically calc: 2nd input = (1st input + days of selected visit plane).
Now, It's sent a request to server, to get visit plane by id, then get number of days, then set is using $set('field.days'), then when user writes an input, it sends another request to do basic calculations in 1st input field! While it's basically can be done as that: 1- inject data-days attribute in options 2- get the selected option with it's data-days value 3- onChange 1st input, fills the 2nd input. Is there any way to solve this? it's huge performance problem when network is weak / slow. code I wrote is refused to paste, so it's in attachments.
2 replies
FFilament
Created by Osamz on 6/11/2024 in #❓┊help
I want to increase all font's sizes
I'm new to Filament, I'm trying to increase all fonts because it looks small, I tried modifying tailwind.config.js but it not affecting
theme: {
extend: {
lineHeight: {
3: '1.2rem',
4: '1.6rem',
// etc
},
fontSize: {
xs: ['1.3rem', {lineHeight: '2.5rem'}],
sm: ['1.4rem', {lineHeight: '2.7rem'}],
base: ['1.6rem', {lineHeight: '2.8rem'}],
// etc
}
},
},
theme: {
extend: {
lineHeight: {
3: '1.2rem',
4: '1.6rem',
// etc
},
fontSize: {
xs: ['1.3rem', {lineHeight: '2.5rem'}],
sm: ['1.4rem', {lineHeight: '2.7rem'}],
base: ['1.6rem', {lineHeight: '2.8rem'}],
// etc
}
},
},
What I'm doing wrong here?
14 replies